Solution required to store server/db connection parameters for use in a JSP.
Posted on 2006-11-15
I've got a jsp app. It connects to an oracle db via JDBC. My problem is how to store the server and database name somewhere, so the code is portable? At the minute, the db name is entered by the users on sign-in and the db server is hardcoded. Not ideal!!
Any ideas? After random googling, I think I might be able to 1. use web.xml file, or 2. JNDI. or 3. A properties file.
Are any of thes on the right lines and if so which would be the best way of doing it?
Some sample code or link to a guide would be great.