JSP application implicit Object

In this tutorial you will learn about the JSP application implicit Object and its application with practical example.

JSP application implicit Object

This is instance of ServletContext and it is created only once by the web container when our web application deploy on server. We need to initialize parameter in the web.xml file and also we can use application scope for this. This Parameter which is initialized in the web.xml can be used in all jsp pages.

Example:Let’s get understand it by an simple example.First we need to open our web.xml file so that we can put “context-params”. Please check below code.

 

#web.xml

#Welcome.jsp: Here we will get our “context-param” data with the help of “application” implicit object.

Recommended:-  JSP Sending Email

#Output: So the output of this code will look like below image.

6

In this tutorial we have learn about the JSP application implicit Object and its application with practical example. I hope you will like this tutorial.