Hello,

this is a follow-up to my yesterday's post (Displaying a maintenance page during re-deployments via manager app).

In order to work around the problem I decided to use Ant's scp and sshexec tasks instead of the Manager application.

I use the autoDeploy="true" feature so that I can simply replace the ROOT.war file in appBase. Everything works fine so far: Tomcat detects that the WAR has been modified, undeploys the old application, deletes the old unpacked directory and extracts the new WAR file to appBase/ROOT.

But unfortunately the same thing happens as described yesterday: During the re-deployment Tomcat sends "400 / Bad Request" responses (No host matches ...). Which again means that Apache can't serve a custom error document (see my previous post).

I hope this is due to some misconfiguration since otherwise it renders the hot-deployment feature useless for me, at least in production environments.

Currently the only work-around is to shutdown Tomcat (as in this case Apache serves the 503 error document), delete the appBase/ROOT directory, replace the WAR and restart Tomcat. This is okay for me and possibly the better solution anyway, since this way I can be sure not to run into any classloader-related garbage collection issues.

However, I think this might be considered as a Tomcat bug, since according to the HTTP RFC 400 is not really an appropriate status code here. I'd be glad if one of the Tomcat developers could give his opinion here.

I'm using Tomcat 5.5.20 with the following server.xml:

<Server port="8005">
 <Service name="Catalina">
<Connector port="8009" protocol="AJP/1.3" useBodyEncodingForURI="true" />
   <Logger className="org.apache.catalina.logger.SystemOutLogger" />
   <Engine name="Catalina" defaultHost="localhost">
     <Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="localhost" appBase="webapps" autoDeploy="true" deployOnStartup="true">
     </Host>
   </Engine>
 </Service>
</Server>

Best regards,
-Felix

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to