Meaningless Drivel is fun!
The moose likes Tomcat and the fly likes Deploying using war file using in other folders Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deploying using war file using in other folders" Watch "Deploying using war file using in other folders" New topic

Deploying using war file using in other folders

Raj Puri
Ranch Hand

Joined: Apr 24, 2003
Posts: 189
I tested war file it deploys application fine under webapp. But we have directories like webapp/retail, webapp/sales etc. Each of these folders hold their own application war files and jsp etc. Can tomcat unpack a file if I put it in retail folder say retail.war. I tried that and it did not work. We are limited to copy our files (including wars's in subfolders of webapp). How do we do that? Seems for tomcat to do automatic deployment the war file needs to be put under webapp only?
Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
when you are creating the war files, include the sales folder also and deploy it in webapp folder.

"Failure is not when you fall down; its only when you fail to get up again."
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

you have this directory structure?

So, Tomcat will not recursively search directories under webapps. It searches for *.war only in the webapps directory, not subdirectories.

So if retail.war and sales.war are two individual applications, then you should have:

And when it gets deployed, those will each expode into a directory named with the war file's name.

If , on the other hand, you have a single directory called "webapp" (note the lack of 's'), and this 'webapp' is a single application, with "subapplications" called retail and sales... then this is not at all how web-apps are to be constructed and deployed. That just won't work.
I agree. Here's the link:
subject: Deploying using war file using in other folders
It's not a secret anymore!