1

Possible Duplicate:
Configure Tomcat to use properties file to load DB connection information

I would like to set some values in properties file and put the file in somewhere in tomcat because the property file's values are changeable. I will give only war file and properties file the customer will change values in properties file while using the application.

mail.smtp.host=smtp.gmail.com
mail.smtp.port= 465

This is what is my exact need. I want to set the values for this mail.smtp.host and mail.smtp.port

I want to access these values from servlet.

please help me how to go about.

Regards Tony

4

1 に答える 1

4

使用する

servletContext.getRealPath("/");

そして、Tomcatからディレクトリに移動できます

こちらもご覧ください

于 2012-06-12T09:39:55.397 に答える