JSP config

tutorial and example
tutorial and example

JSP config object is used to send the configuration information to JSP page. Here, config is an instance of servlet’s ServletConfig interface.

In this case, the information is send to JSP page through web.xml file. Config object is used to fetch this information. It is used widely for the initialization of parameters.

Note: – The scope of JSP config object is up to a single JSP page only.

Example of JSP Config

  In this example, web.xml file contains the information. The config object in index.jsp file fetches that information.

index.jsp

web.xml

Output: