Thanks Chris, for your answers.

My understanding was that tomcat figures out the changes in the re-deployed war 
file and starts to explode it in order to overwrite the existing exploded 
directories in order to serve the changes in war file. But it looks like it 
does not overwrite the exploded folders. 


I knew that deleting the work directory and webapps exploded directories before 
every deployment works without any problem. One easy solution i see is why not 
just use exploded directory structure for deployment instead of war file. Then 
it will solve my issue as  i saw it working.. Just was curious to understand 
tomcat behavior with war files.

Thanks to all for all your replies.

-G



________________________________
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Monday, August 15, 2011 8:21 AM
Subject: Re: Cannot make war file as default app

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

G,

On 8/12/2011 4:59 PM, exquisite wrote:
> Now when i renamed my war to ROOT.war and drop it in webapps folder 
> (without any context in server.xml), it deploys fine for the first
> time as the root app (Creates a ROOT folder in webapps),  but if i
> make any change to any of my jsps and drop the new ROOT.war file, it
> says its deploying ROOT.war but it does not pick the changes after
> restart. It keeps showing me the old jsp when i run. I tried with
> autoDeploy=true in Host config but there is no change.

You shouldn't have to do anything strange to get this working. Tomcat's
default configuration is to auto-deploy WARs and directories in the
webapps/ directory and also to re-load them if they change.

The only thing that can get out-of-sync is the Tomcat deployment
descriptor (context.xml) that gets copied from the WAR file (or
directory) into conf/[Service]/[Hostname]/[appname].xml. You will have
to undeploy/deploy (or just delete the file) in order to update it.

> Do i have to manually delete the ROOT folder that tomcat creates,
> everytime before the fresh deployment?

No, but it might be a good idea to completely shut-down Tomcat, delete
the entire "work" directory as well as an exploded WAR directories in
webapps/ and any files in conf/[Service]/[Host]. Then, start Tomcat
normally and everything should run smoothly from there on out.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5JOWIACgkQ9CaO5/Lv0PAmsACgtCAzkxGLVfTIO9uQa552xpZd
gQoAn2qOmcqxgc3WUSOTEp1MRIbvTCc+
=ASxn
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to