Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Organising Tomcat for different projects

 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds like a perfect use of the concept of web applications. Am I missing something?
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic