wood burning stoves 2.0*
The moose likes Tomcat and the fly likes WAR FILES Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "WAR FILES" Watch "WAR FILES" New topic
Author

WAR FILES

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Once you put the war file say beer.war under webapp/ and make a first request to it, Tomcat will unpack it webapp/beer and after
that it will behave like a normal webapp. Note that webapp/beer.war and webapp/beer/ will exists after the war file is unpacked.
However if you delete the webapp/beer/ and keep the beer.war then welcome files will behave a bit differently as explained below

The static content in the WAR is as follows
/foo/index.html
/foo/default.jsp
/foo/orderform.html
/foo/home.gif
/catalog/default.jsp
/catalog/products/shop.jsp
/catalog/products/register.jsp
� A request URI of /foo will be redirected to a URI of /foo/. --> In an unpacked version it will go to the welcome file
� A request URI of /foo/ will be returned as /foo/index.html.
� A request URI of /catalog will be redirected to a URI of /catalog/. --> In an unpacked version it will go to the welcome file
� A request URI of /catalog/ will be returned as /catalog/default.jsp.
� A request URI of /catalog/index.html will cause a 404 not found
� A request URI of /catalog/products will be redirected to a URI of /catalog/products/.
� A request URI of /catalog/products/ will be passed to the �default� servlet,
if any. If no �default� servlet is mapped, the request may cause a 404 not


SCJP, SCWCD, SCBCD
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Please do not post in all uppercase. Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: WAR FILES
 
Similar Threads
welcome-file-list in web.xml
servlet deployment error in web.xml on WSAD 4.x
How to make the default page with Tomcat?
war files.
EL in WSAD not working