Re: Configuration params for a webapp - best practice?
- From: Chris Smith <cdsmith@xxxxxxx>
- Date: Wed, 30 Aug 2006 22:03:03 -0600
Steve <root@xxxxxxxxx> wrote:
Where is the best place to configure this path so it's not hard coded in the
web app and is easy to configure when the app is deployed?
The right way to do this is to put the information in a context
initialization parameter. From any servlet, you can access this
information from the ServletContext object. You can put a default value
into web.xml, and then the servlet container will provide a mechanism to
configure the parameter for a particular deployment (for example, in
Tomcat, you'd use server.xml in the conf/ directory).
--
Chris Smith
.
- Follow-Ups:
- References:
- Prev by Date: Re: Java Threading Issues
- Next by Date: Re: How to invoke assignment operator in a native method?
- Previous by thread: Re: Configuration params for a webapp - best practice?
- Next by thread: Re: Configuration params for a webapp - best practice?
- Index(es):
Relevant Pages
|