• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Organising Tomcat for different projects

 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic