Re: Configuration params for a webapp - best practice?
- From: Steve <root@xxxxxxxxx>
- Date: Thu, 31 Aug 2006 18:36:04 GMT
On 31/8/06 05:03, in article MPG.1f600d5ff65871c29896e6@xxxxxxxxxxxxxxxx,
"Chris Smith" <cdsmith@xxxxxxx> wrote:
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).
Thanks Chris.
--
Regards,
Steve
"...which means he created the heaven and the earth... in the DARK! How good
is that?"
.
- References:
- Configuration params for a webapp - best practice?
- From: Steve
- Re: Configuration params for a webapp - best practice?
- From: Chris Smith
- Configuration params for a webapp - best practice?
- Prev by Date: Re: Reflection, how to understand
- Next by Date: Re: jview vs java.exe (speed)
- Previous by thread: Re: Configuration params for a webapp - best practice?
- Next by thread: workaround to suspend the session object
- Index(es):
Relevant Pages
|