• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remote WAR file

 
Pushkal Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Is it possible to source a remote WAR file (hosted on an Apache Web Server inside the htdocs folder as a resource) into an Apache Tomcat 6.x server? The idea is for the Tomcat to source in the latest WAR file during boot time.


<Host name="mydomain.com" unpackWARs="false" autoDeploy="true" appBase=""><Context path="" docBase="jar:http://mydomain2/someapp.war!/" debug="1" reloadable="true" crossContext="true">
...
...

I'd appreciate any lead.

Thanks,
Pushkal
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, but you can upload a new jar via the manager app.
 
Pushkal Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.

Would this uploaded jar actually persist in some directory (like webapp) automatically upon upload? Or in some cryptic temp structure inside Tomcat?
 
Pushkal Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked, it does persist it in the webapps folder.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pushkal Mishra:
Or in some cryptic temp structure inside Tomcat?


It can work either way, but I don't think that the method used when you've got Tomcat configured not to unpack war files is all that cryptic.
When deployed this way, the war file gets unzipped into Tomcat's work directory.

One thing to note, is that dropping a new version of a war file on top of an existing one is like unzipping one directory structure onto an old one.
It will add files that weren't there, previously. It won't remove files just because they don't exist in the new war file. And on Windows, at least, I've found that it won't always update a jar with the new version. This might be due to the Windows Service locking jar files. Also, if the JSP's file dates in the new war file are older than the ones already in service Tomcat won't know to re-compile them.

Personally, I prefer to undeploy first to make sure that the new version is starting out with a clean slate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic