Getting context initialization parameters in JSP

Context initialization parameters are parameters defined in the web.xml deployment descriptor and are available to all servlets of your webapplication.

web.xml example:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"


   ServletContext context = config.getServletContext();
   String value1 = context.getInitParameter("name1");
   String value2 = context.getInitParameter("name2");
Value of name1: <%=value1%><br>
Value of name2: <%=value2%>