I am working in a jsp project. I have several SQLs. Currently I hard code them in the relating .java files. I guess this maynot be the proper way to do. Where should I put them? In a config.xml or sql.xml? Put them into a properties file? or put them in files with .sql extension separately, but them what is the proper and easy way to access them? Or any other good suggestions? Thanks in advance.
+1
A:
You might want to read some threads :
How to implement database functionality effectively?
Best way for many classes to reference a database connection class
Design Patterns in Database Applications with Java (JEE / JSE)
adatapost
2010-06-29 03:34:48