Re: placing the properties file in tomcat
Kamesh,
Thanks for shedding some light, but now i have a few more questions. Please
bear with me. you can possibly show me the first few steps of how i should
approach my problem. I am already using the application.resources file for my
displaying errors, although i must admit it's inner working i have yet to fully
understand. anywho, now i would like to make the use of another properties file
that stores things like paths to certain files, server name etc. These
obviously i need at various points in the application. let this property file
be app.properties. from what i understood, i can place this file in the
/WEB-INF/classes folder and i my entry for it in the web.xml will be something
like
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>app.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
I don't know what to substitute servlet-name and servlet-class with. and again,
how do i access these properties from my beans and jsps.
I did look at the java.util.ResourceBundle, but that didn'tdo much except for
give me a conceptual understanding of the usage of resourcebundle.
(Continue reading)