How to get context-param value in java?

The “context-param” tag is define in “web.xml” file and it provides parameters to the entire web application. For example, store administrator’s email address in “context-param” parameter to send errors notification from our web application. web.xml <context-param> <param-name>AdministratorEmail</param-name> <param-value>[email protected]</param-value> </context-param> We can get the above “AdministratorEmail” context-param value with the following java code. String email= getServletContext().getInitParameter("AdministratorEmail"); …

Read more