aspose file tools*
The moose likes Tomcat and the fly likes Multiple .War files on Tomcat container Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Multiple .War files on Tomcat container" Watch "Multiple .War files on Tomcat container" New topic
Author

Multiple .War files on Tomcat container

Rob Jon
Greenhorn

Joined: May 22, 2008
Posts: 12
Need help in configureing Tomcat container with multiple .war files. Which means i want to use one tomcat container for multiple websites. Is it possible? if yes how can i do it.

Please help and thanks to all in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Of course it is. Each web app is termed a "context". The Tomcat docs and the Servlet Spec explain it all in great detail.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Just upload your war files to the webapp directory.

The name of the war file will become the context root.

So, on my website, www.scja.com, I upload a file named associate.war to the webapps directory of Tomcat, and tomcat deploys the application. I can then access my webapp through

http://www.scja.com/associate

I also have a war file named thesimpsons.war which I deploy to the same server. It's another web app. But once in the webapps directory, you can access the landing page through:

http://www.scja.com/thesimpsons/index.jsp

So, this is just a simple, live example, of multiple war files being deployed to a single tomcat server.

-Cameron McKenzie
Rob Jon
Greenhorn

Joined: May 22, 2008
Posts: 12
thanks Cameron for your response. it help me a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple .War files on Tomcat container