I finally had my Catalina-Ant undeploy task working after I included
context.xml into my war's META-INF directory. What this deployment doing is

- war is uploaded to $CATALINA/work/Standalone/my.host/manager;
- war is unpacked into $CATALIAN_HOME/webapps/myapp;
- context.xml is extracted to manager directory as myapp.xml;
- server.xml is modified to include the content in myapp.xml;
- myapp is loaded.

I noticed that myapp's docBase in the modified server.xml is the war in
manager directory. This helps to undeploy myapp but prevents me from reading
my configuration xmls from WEB-INF/conf. I cannot
getServletContext().getRealPath("/") to get $CATALINA_HOME/webapps/myapp.
According to Servlet API doc, getRealPath returns null if content is
available from war. I don't want to hard-code the path into web.xml as
init-param or into my init Servlet. Does any one have input?



Regards,

 
 
PQ

"The difference between 'involvement' and 'commitment'
is like an eggs-and-ham breakfast: the chicken was
'involved' - the pig was 'committed'."

Reply via email to