aspose file tools*
The moose likes Tomcat and the fly likes why .war file in webapps folder only Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "why .war file in webapps folder only" Watch "why .war file in webapps folder only" New topic
Author

why .war file in webapps folder only

Asif Kadiwala
Greenhorn

Joined: Jun 10, 2008
Posts: 17
Can anyone tell me that why we are putting our web applicaton in web-apps folder only?? How server recognizes the presence of application in webapps folder?
[ June 20, 2008: Message edited by: Asif Kadiwala ]
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Originally posted by Asif Kadiwala:
Can anyone tell me that why we are putting our web applicaton in web-apps folder only?? How server recognizes the presence of application in webapps folder?

[ June 20, 2008: Message edited by: Asif Kadiwala ]


That depends on the container's implementation. With tomcat, it looks at the webapps folder by default. Other containers might look elsewhere


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The webapps directory is the the default place to put web apps but it's far from the only place you can put them. Tomcat allows you to configure multiple hosts. Each host has an appBase attribute which can point to any directory you choose.
Furthermore, you don't even need to place your app in its host's appBase directory. You can configure the docbase to point to any directory on your system that Tomcat can see.

For more details, see:
http://tomcat.apache.org/tomcat-6.0-doc/config/index.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why .war file in webapps folder only