You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by micky none <ha...@rediffmail.com> on 2005/01/31 18:07:34 UTC

Specifying context details in web.xml

Hi Friends,
I need to ask you guys that is it possible that I can move the context details from my server.xml to web.xml.Like when i make a "war",i want that i should specify the database url,driver,username,password etc. details .Presently i have 2 contexts(one for alpha databse other for the live one)in the server.xml file in the server.But i need these details in my web.xml.Can you tell me if I can do so....any help would be appreciated.
Thanks

Re: Specifying context details in web.xml

Posted by QM <qm...@brandxdev.net>.
On Mon, Jan 31, 2005 at 05:07:34PM -0000, micky none wrote:
: I need to ask you guys that is it possible that I can move the
: context details from my server.xml to web.xml.Like when i make a "war",i want
: that i should specify the database url,driver,username,password etc. details
: .Presently i have 2 contexts(one for alpha databse other for the live one)in
: the server.xml file in the server.But i need these details in my web.xml.

You can do this, but not necessarily using web.xml.

Search the Tomcat docs for "context.xml."  The short version is that you
store this in you WAR file.  It contains settings for that context.  

context.xml is essentially a <Context/> element inside its own file.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org