getServletContext().getResourceAsStream("/WEB-INF/classes/quartz.properties")
if the servlet and properties file are in the same web app. If they are in separate web apps you could instead use
getServletContext().getContext("/TheOtherContext").getResourceAsStream(..)
If you need an absolute path to the file then ServletContext.getRealPath(..) could help.
Best wishes,
Paul
On 2/17/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
The hot deployment is excellent for the automation of the deployment. But
we ran into the problem of inability to specify the file path of the
property files.
We have the file path information in the web.xml as shown below
<servlet id="Servlet_6">
<servlet-name>initialize</servlet-name>
<servlet-class>com.web.someaction.InitializeServlet</servlet-class>
<init-param id="InitParam_i1">
<param-name>config</param-name>
<param-value>/opt/geronimo-1.0
/deploy/some.ear/someweb.war/WEB-INF/classes/quartz.properties</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
Of course, geronimo will complain that it is not a directory. Then we
cannot predict the numeric directory name under /opt/geronimo- 1.0
/config-store For the subsequent deployment, we know where the some.ear
will be expanded into. Would I have to deploy the application once for the
first time just to know the /opt/geronimo-1.0/config-store/${NUMBER}? Or
is there any other way around this?
Many thanks again in advance.
Young
