tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Blidorf <so...@nolas.dk>
Subject SV: ROOT.war - how to access web.xml
Date Sat, 27 Feb 2010 19:49:53 GMT
By the way.

I also have info as init-param in my struts servlet configured in the
web.xml

So I guess I should just loose the getServlet.getInitParameter and just use
getServletContext().getInitParameter???

By the way I don’t have access to the conf. I guess I have access to ROOT or
webapps. Can I put the context.xml fil there?

-----Oprindelig meddelelse-----
Fra: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sendt: 27. februar 2010 19:21
Til: Tomcat Users List
Emne: RE: ROOT.war - how to access web.xml

> From: Søren Blidorf [mailto:soren@nolas.dk]
> Subject: ROOT.war - how to access web.xml
> 
> I have deployed my ROOT.war file. Is there any way to access
> the web.xml.
> 
> I save db login info in it and I would like to be able to 
> deploy the same ROOT.war file on different sites and only 
> change the web.xml after.

Don't put the site-specific parameters in web.xml.  Instead, nest them
inside a <Context> element in a companion file to be located in
conf/Catalina/[host]/ROOT.xml on each server.  Use the <Parameter> or
<Environment> elements as appropriate.

Look here for details:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Context%20Parame
ters
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Environment%20En
tries

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.


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


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


Mime
View raw message