Mark wrote:
>
> Can anybody tell me where a good location to place Servlet initialisation
> files would be?  We normally place .ini files in the directory with the
> application, but for Servlets this doesn't seem the best thing to do.

We have adopted the use of ResourceBundles to load properties files found in
the classpath. We create a specific directory just to hold servlet startup
files.

Include this specific directory in the classpath for your servlet engine.
Pass the name of the properties file to the servlet as an initialization
parameter. If your props file is named 'servlet1.properties' just pass
'servlet1' to the servlet startup parameters.
In the servlet init method you can use the ResourceBundle to load your
properties file and you are good to go.

Mike

========================================
Mike Fontenot - Object Systems Architect
Polygon Network, Inc.
Golden, CO
========================================

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to