tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kimberly Begley" <kimberly.le...@gmail.com>
Subject Re: where to put config file in a webapp
Date Wed, 02 Apr 2008 11:56:53 GMT
Great thanks - it's not actually in a servlet - just a java class of methods
so I guess I could pull it out of the java class and put it into the servlet
that is calling the method - if that makes sense - I was just hoping to
avoid that.
Thanks for the advice - much appreciated.


On Wed, Apr 2, 2008 at 9:47 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Kimberly Begley [mailto:kimberly.lewis@gmail.com]
> > Subject: where to put config file in a webapp
> >
> > Currently it is in WEB-INF
>
> Normally, such a properties or config file would be placed in
> WEB-INF/classes, and accessed via ServletContext.getResourceAsStream().
>
> > I read online that I could put the entry in the web.xml file?
>
> See section 4 of the Servlet Spec, in particular the
> ServletContext.getInitParameter() API, then look at the Tomcat doc for
> where to set them:
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Context%20Pa
> rameters
>
>  - 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 start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Kimberly Begley

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message