tags:

views:

99

answers:

4

When I put a new war file in the webapps directory and restart tomcat, my war file is exploded but the servlets are not available and their respective log files are not created in the logs directory. When I bounce tomcat again, then the servlets are available and the log files are created. I'm assuming I have setting(s) not correct within tomcat, but I'm not sure where to start.

Does anyone know the cause of my current situation? Or even what parameters to review?

New Additional/Comments: Our setup allows us to have our app 'myApp' be the default application that is seen at root of our URL. On the first starting of tomcat, I can get to myApp by going to /myApp/index.html - whereas on the second start of tomcat I can then just goto and myApp/index.html is displayed.

My welcome file list is the 'myApp/index.html'

+1  A: 

I had a similar problem with Tomcat 6.0.26. I worked around it by deleting the exploded webapps before copying the new war file to the webapps directory. Maybe a little kludgy, but it solved my problem.

oksayt
was that while tomcat was still running?
Queso
No, it was part of an ant target that first stops tomcat and then does the above.
oksayt
A: 

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

antiJARLocking

If true, the Tomcat classloader will take extra measures to avoid JAR file locking when resources are accessed inside JARs through URLs. This will impact startup time of applications, but could prove to be useful on platforms or configurations where file locking can occur. If not specified, the default value is false.

Aaron Saunders
I just tried this and still have the same issue.
Queso
A: 

have you set unpackWars and autoDeploy params to true in your server.xml file?

oyo
Both are set to true
Queso
ok. I'm not really an expert so I cannot tell you more if I can't see your server.xml file (in the conf directory of Tomcat), which version of Tomcat you use, and your web.xml file (in your application WEB-INF directory). But perhaps it's just a '/' error somewhere... (the logs when tomcat start can be suffisant)
oyo
A: 

Try to do unpackwars=false and always make sure tomat is not running when you do deployment try to avoid hot deployment...

Elango
I'd like to unpack the war files in case I need to make any changes to the app while its running.
Queso