tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Propeties file
Date Mon, 01 Dec 2003 19:44:48 GMT

I'd like to know why so few people bother to do a bit of research prior
to posting ;(

You can search the archives of this list, and you'll see that you have
two main choices, summarized as:
- Put it under your webapp root, and use ServletContext#getResource(...)
- Put it on the classpath, and use ClassLoader#getResource(...)

- You have other choices, but they're more complex, e.g. JNDI
- You should NOT use a File-based approach, as it won't work in a packed
WAR distribution

- Since these are connection properties for a DB, you may wish to let
tomcat setup your datasource for you: see the JNDI DataSources How-To

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: laurent marot []
>Sent: Thursday, November 27, 2003 12:25 PM
>To: Tomcat Users List
>Subject: Propeties file
>Hi all,
>i have a web application running on Tomcat 4.1.24/win2k that connect
>connection properties are in file and i'd  like to know where could be
>better way to store that properties files
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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:
For additional commands, e-mail:

View raw message