What you are doing is a good idea Azz Romaysa. Trying to avoid proliferating SQL in code throughout you servlets is the right way to go. One way people often do this is using the DAO pattern. I'd google for it and see if it solves your worries. If you want to keep SQL in one file, look at the java.io package for guidance. And I'd forget your ResourceBundle idea - since they are specifically for internationalization.