tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keshav Arora <karor...@gmail.com>
Subject Re: Error in Tomcat when redeploying the Web application
Date Thu, 03 Mar 2011 16:07:56 GMT
Thomas,

Thanks so much for your reply!

Yes you are correct, we redeploy the application by copying the new version
of war file to webapps folder. I've created a build script that builds the
war file and copy it to Tomcat\webapps folder. Tomcat is installed on my
local machine. So file is always copied on the same files system. Process
was same when we were using Tomcat 6.0.29. So I'm not sure why we are
getting the errors with Tomcat version 7.

Can you please elaborate regarding context descriptor file?

Regards,
Keshav

You did not tell anything about your redeployment process. I assume
your just putting a new version of your war file to webapps/ (or
whatever appBase is configured to). Tomcat redeploys your app after
the timestamp of the war file is updated. It seems that this happens
before the war file is written completely.

You can avoid this by using a context descriptor file (usually in
the conf/Catalina/localhost/ directory (see [1]) pointing to the war
file (attribute docBase) somewhere on the system. For a redeployment
you just have to change the docBase attribute to point to the new war
file.
Another option is to copy the war file somewhere on the same
filesystem your tomcat is installed and move it to your webapps/
directory.

[1] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

Regards,
Thomas Freitag

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message