you can use the following approach. write all your properties in properites file and store that file in /WEB-INF/classes .
my properties file contains
url=jdbc:mysql://venu/tms10?user=root&password=umarao
driver=com.mysql.jdbc.Driver
and in your code you can read these properties file. using the following code.
resourceBundle= ResourceBundle.getBundle("resource");
dBURL= gclsResourceBundle.getString("url");
dBDriver= gclsResourceBundle.getString("driver");
but this works if you are reading your values through standard
java class.
and class is stored in /WEB-INF/classes. if you want it to be read from
JSP page you have to adjust your path in ResourceBundle. But it is not good
practice to connect to the database directly from jsp page.
[ March 31, 2005: Message edited by: Bonagiri UmaMaheshwar Rao ]