Can my JSP page access initalization parameters from the servlet context?
Created May 7, 2012
Govind Seshadri The only way you can obtain the init param from the servlet context is if you have context initialization params defined within your web.xml. For example, if your web.xml has something like:
<context-param> <param-name>webmaster</param-name> <param-value>myaddress@mycompany.com</param-value> </context-param>You can then access the "webmaster" init param from within your JSP scriptlet as:
String value = getServletContext().getInitParameter("webmaster");