Thanks Hans
I was able to create multiple environments. I have another question, i have
properties file for my different contexts with different data some thing
like database connection url etc.,
When i try to load the property file in my bean, it gives me file not found
exception.
I tried placing the properties file in all the places under my webapps/myapp
directories, but it doesnot seem to work.
Could u help me in this matter.
I read that i can add the path of the properties file into the class path,
but this will not help me coz, the properties file has the same name for all
the contexts but with different data, and i donot want to change my bean for
loading different propeties files(may be i will if nothing else works
out...)
Thanks for ur time
Vamsee
-----Original Message-----
From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 11, 2001 3:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Setting up multiple environments on the TOMCAT
"Bommakanti, Vamsee" wrote:
>
> Hello all
> I am using tomcat as my webserver and jsp and java beans in the
> appilication.
> We r ready to setup our project for testing, and i have installed tomcat
and
> deployed our application on the test server.
> But, i have a problem here. My company wants to have multiple test
> environments on the same server. We have created multiple database schemas
.
> Now i need to setup similar environments for the tomcat also.
> The catch is i have all the beans in a package and i put the classes in
the
> classes directory of tomcat.
> I can create multiple contexts and put multiple jsp pages( this is
necessary
> as the updates to the code would be different for different users during
the
> testing phase) under them. But i dont know how to have different beans for
> these different environments. [...]
Each context use its own class loader, so you can have different versions of
the beans for each context. Just place the bean class files in WEB-INF/lib
or WEB-INF/classes for the application (context). This behavior is part of
the servlet specification, so it works the same in all compliant containers.
Another approach is to let each developer run his/her own copy of Tomcat
on his/her workstation. That's typically easier than messing with a shared
server during development.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets