Your problem is a deployment problem--not a development problem. Therefore, you should only touch files associated with the process of deployment.
Use the Environment declaration in server.xml to define variables which are specific to a given deployment. ----- Original Message ----- From: "Andoni" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 08:45 Subject: Re: An easy one... Default Config in conf/web.xml > But that's the way I want it to be. At the moment my apps are machine > dependant because they use the > web-inf/web.xml file but if I could use the server's web.xml file instead I > would not have to reconfigure every time I move an app across to my live > server. > > Andoni. > > > ----- Original Message ----- > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Friday, February 14, 2003 3:38 PM > Subject: RE: An easy one... Default Config in conf/web.xml > > > > Howdy, > Your parameters should be in your web.xml, which is in your war file if > you're using a war file. They should not be in the server web.xml (the > one in conf/web.xml in tomcat 4.x). They are not part of the server and > don't belong there. Putting them there makes your application less > portable and container-independent, which is a heavy cost. > > Yoav Shapira > Millennium ChemInformatics > > > >-----Original Message----- > >From: Andoni [mailto:[EMAIL PROTECTED]] > >Sent: Friday, February 14, 2003 10:32 AM > >To: Tomcat Users List > >Subject: An easy one... Default Config in conf/web.xml > > > >Hi, > > > >I am using sections like that below to store the database url / > username / > >password for my server. I then access these from the code using > > > >getInitParameter("database_password"); > > > >in my code. What I would like is to move these out to the web.xml file > in > >conf/web.xml so that when I move my .war file from the development to > the > >live server it just picks up the new url's and passwords automatically. > > > >Problem: > >I can't figure out how to install these sections into the conf/web.xml > >file. > >I have tried putting them in the "default" servlet and the "invoker" > >servlet > >and also creating a servlet section of it's own but none of these work. > I > >want to still be able to have a web.xml for most things (e.g. > >session-timeout) but just have some things in the default one. > > > > <init-param> > > <param-name>database_password</param-name> > > <param-value>mypassword123</param-value> > > </init-param> > > > > > >Anybody know the answer? I'd be very appreciative if you did. > > > >Regards, > >Andoni. > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, proprietary > and/or privileged. This e-mail is intended only for the individual(s) to > whom it is addressed, and may not be saved, copied, printed, disclosed or > used by anyone else. If you are not the(an) intended recipient, please > immediately delete this e-mail from your computer system and notify the > sender. Thank you. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
