Hello Judd,

The catalina-ant deploy task does this if you include a
"META-INF/context.xml" file in your .war file.

Note:  deploy uses HTTP PUT, so you cannot achieve this through your
browser.  Use the ant deploy task or some other custom piece of
software that supports HTTP PUT.

Jake

Thursday, February 20, 2003, 3:38:33 PM, you wrote:

JW> Hi, all,
JW> I have multiple servlets running within tomcat 4.1.18 for which I need 
JW> individual log files. I also wish to update individual servlets without 
JW> restarting tomcat. To achieve this I:
JW>   copy (via ant) servlet foo.war files to $TOMCAT_DIR/webapps/fooDir/. 
JW> Copying them to a subdirectory avoids tomcat's auto-deployment (which 
JW> unpacks the .war files one time only).
JW>   copy (via ant) fooContext.xml files to $TOMCAT_DIR/webapps/. These 
JW> files specify contexts (including custom loggers) for my servlets.
JW> When tomcat starts up, it reads the custom context files and then 
JW> installs the servlets, without unpacking them,  with appropriate 
JW> logging. So far, so good.

JW> Then, to replace a running servlet, I hit the manager app with two URL's 
JW> in succession like:
JW>   http://localhost:8080/manager/remove?path=/fooPath
  
JW> 
http://localhost:8080/manager/install?path=/fooPath&war=jar:file://fullPathTo/webapps/fooDir/foo.war!/

JW> Unfortunately, when I restart an app this way I cannot specify a 
JW> fooContext.xml and so the new running servlet logs to the default (host 
JW> container) logger.  Is there a way to deploy an application that uses a 
JW> context-specific logger by hitting the manager app with appropriate URL's?

JW> Thanks.
JW> Judd Wilcox

JW> Example of my ./webapps/fooContext.xml files:
JW> <Context path="/fooPath" docBase="./fooDir/foo.war">
JW>   <Logger className="org.apache.catalina.logger.FileLogger" 
JW> prefix="localhost_foo_log." suffix=".txt" timestamp="true"/>
JW> </Context>


JW> ---------------------------------------------------------------------
JW> To unsubscribe, e-mail: [EMAIL PROTECTED]
JW> For additional commands, e-mail: [EMAIL PROTECTED]



-- 
Best regards,
 Jacob                            mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to