I have my JDBC parameters set as context parameters in my web.xml file as such:
Is this ok to do? Or a bad idea? I know it works, and did it primarily so I could maintain these attributes through just the web.xml file. [ March 29, 2007: Message edited by: Jenn Person ]
Why do not you use the connection pool provided by the container as Sunil mentioned? Or , if you want to go by this approach then it would be bettter to have a db.properties file within your application , which would have all the connection related parameters.
I do not see and security threat to your approach as this (web.xml) would be within the WEB-INF directory.In fact I have worked on some application where some parameters are passed to the application using the init-param.