aspose file tools*
The moose likes Tomcat and the fly likes Organising Tomcat for different projects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Organising Tomcat for different projects" Watch "Organising Tomcat for different projects" New topic
Author

Organising Tomcat for different projects

Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Hi guys,

I just wanted to know how I could organise my projects in such a way that I can have multiple projects on Tomcat running, with different databases/sources at the same time.

As it stands I have all my JSP's etc organised in ....Tomcat 5.5\webapps\ROOT\JSP\...

How should I go about changing my approach so I have neatly organised projects?

Thanks in advance.
Regards
Zein
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
That sounds like a perfect use of the concept of web applications. Am I missing something?


Ping & DNS - my free Android networking tools app
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
See Ulf what I was thinking along the lines of ,

....Tomcat 5.5\webapps\ROOT\Proj1\JSP\...

....Tomcat 5.5\webapps\ROOT\Proj2\JSP\...

....Tomcat 5.5\webapps\ROOT\Proj3\JSP\...

Do I just copy the WEB-INF folder for each project from the original folder??

Also for each project I will be having seperate data sources, which I understand I need to 'register' in the server.xml file, would this allow me to have more than one data source?

Thanks in advance
Regards
Zein
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
Don't put anything into ROOT - it is its own web application that you should not alter. Create a directory layout like:

....Tomcat 5.5\webapps\Proj1\JSP\...

....Tomcat 5.5\webapps\Proj2\JSP\...

....Tomcat 5.5\webapps\Proj3\JSP\...

Each of these would have their own WEB-INF directory with their own web.xml file.

You can have any number of data sources; just make sure to give them different names.
[ February 15, 2007: Message edited by: Ulf Dittmer ]
 
 
subject: Organising Tomcat for different projects