tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: where to put config file in a webapp
Date Wed, 02 Apr 2008 11:56:26 GMT
Caldarale, Charles R 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().
>
>   
If using ServletContext.getResourceAsStream(), the file can be anywhere 
in the webapp.  If using Class.getResourceAsStream(), then it has to be 
in WEB-INF/classes or in a jar in WEB-INF/lib.

>> 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
>
>   


---------------------------------------------------------------------
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


Mime
View raw message