File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes multiple apps on Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "multiple apps on Tomcat" Watch "multiple apps on Tomcat" New topic
Author

multiple apps on Tomcat

Chad Foor
Greenhorn

Joined: Jul 03, 2007
Posts: 23
Hello,

I'm trying to figure out how to do this within the server.xml file and it's a bit confusing.

I have 3 (and potentially more) apps on the server that I've got successfully posted and running fine. However, what I'd like to do is this - set up the site to default to myApp1 if the location isnt specified in the browser's URL - http://www.mysite.org/, Tomcat will default point to
the ${TOMCAT_HOME}/webapps/myApp1/ location.

So, the URLs 'http://www.mysite.org/' and 'http://www.mysite.org/myApp1/'
will point to the same location.

I also want to have the alias also handle the URL mappings - http://www.mysite.org/myApp2/
http://www.mysite.org/myApp3/
... (etc)
(and thus run their respective web apps normally.)

It's not very clear reading the literature on the server.xml docs on exactly how to set this up.

I'd appreciate any insights.

Thank you,
Chad
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56215
    
  13

You can set up a context for root and on for myApp1 to point to the same docbase. That will give you two sepaate instances of the same web app though, which may not be what you want.

Othersie, just put an index.jsp in the root docbase of the root web app that redirects to your desired app.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: multiple apps on Tomcat
 
Similar Threads
Multiple Contexts, Single Project/App
child window parent window different domain
Tomcat Configuration with more than 2,000 apps
One Tomcat container with multiple equal applications
Setting up web sites