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.
Asked
Active
Viewed 617 times
2
-
Related: http://stackoverflow.com/questions/1661921/java-programming-where-should-sql-statements-be-stored This question by the way also indicates that you didn't read the links I posted in an answer in your previous question. I suggest to do so. – BalusC Jun 29 '10 at 11:38
-
Thanks for the link to the discussion. The link (http://balusc.blogspot.com/2008/07/dao-tutorial-data-layer.html) you suggested previously is broken with this error message "The webpage at http://balusc.blogspot.com/2008/07/dao-tutorial-data-layer.html might be temporarily down or it may have moved permanently to a new web address." Couldn't access!! I really appreciate for your continuous help. Thanks. – Ken Jun 29 '10 at 14:35
-
Hmhm... I still can't access it.. Maybe because blogspot.com contain 'sensitive' material so it is blocked like Facebook and Twistter by Chinese government... (that's why Google left China).. – Ken Jun 30 '10 at 12:39