if i want to modify init-parameter value in any of ServletContext or ServletConfig. any want it to be updated after servlet is destroyed by container. is there any wayout?
Asked
Active
Viewed 4,355 times
1
-
Besides altering the value in web.xml? Are you asking to pro grammatically update the web application's WEB-INF/web.xml file's init parameter(s) for a given servlet based on some condition you detect at runtime? – Brian Jun 20 '09 at 18:08
-
yes thats what i want if it is possible. – Maddy.Shik Jun 21 '09 at 06:38
1 Answers
-3
you can set params programmatically while accessing the ServletConfig
config.getServletContext().setInitParameter("foo", "bar")

ccDict
- 633
- 2
- 6
- 17
-
https://www.oreilly.com/library/view/head-first-servlets/9780596516680/ch05s09.html – hammelion Feb 12 '19 at 12:45