aspose file tools
The moose likes Servlets and the fly likes InitParameters Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "InitParameters" Watch "InitParameters" New topic
Author

InitParameters

Amul Kanjer
Greenhorn

Joined: Sep 27, 2001
Posts: 1
Is there a way to change the InitParameters of a servlet on the fly without reloading the servlet.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

There are two easy ways to do it, firstly you can mek them instance variable so they are shared by all threads then anyone can alter the details, but this becomes difficult to track and manage.
The way we sometimes do it is have all properties (initparams or other) managed in an external class for all situations. This can, for example, represent a dynamic properties class that checks for changes in the properties file and reloads them if required.
Dave.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: InitParameters
 
Similar Threads
getInitParameter method in ServletContext and ServletConfig
Passing data to and from a jsp page
Accessing Servlet init Parameter by Expression language
Servlet's "configuration" parameters
Servlet Constructor