tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: where to put config info
Date Tue, 09 Apr 2002 13:57:40 GMT

getInitParameter(someString) lets you access information in the web.xml
file. someString corresponds to the name of the param in the web.xml.

Note that there is are ServletContext and
ServletConfig implementations.

The ServletContext version could be used where you have values that
are shared across all of your servlets/jsps.

The ServletConfig allows you to have information that is specific to
a servlet or jsp.

At 07:41 AM 4/8/02, you wrote:
>I'm new to tomcat and was just wondering where other developers put
>configuration key value pairs in there tomcat apps.
>For example, if I wanted to read in a version number and display it on one
>of my pages.  Or if my app connects to multiple databases.  Where could I
>put the connection information?  Can you put that kind of stuff in the
>web.xml file?  Are there built in conveniences to do this?
>This message, including any attachments, contains confidential information 
>intended for a specific individual and purpose, and is protected by 
>law.  If you are not the intended recipient, please contact sender 
>immediately by reply e-mail and destroy all copies.  You are hereby 
>notified that any disclosure, copying, or distribution of this message, or 
>the taking of any action based on it, is strictly prohibited.
>To unsubscribe:   <>
>For additional commands: <>
>Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message