JSP application implicit object example

In JSP, the application is an implicit object of type ServletContext.

The instance of ServletContext is created only once by the web container when the application or project is deployed on the server.
All JSP Examples at JSP Source Code Examples.
This object can be used to get the initialization parameter from the configuration file (web.xml). It can also be used to get, set, or remove an attribute from the application scope.

Example of application implicit object:


<form action="welcome">  
   <input type="text" name="uname">  
   <input type="submit" value="go"><br/>  








   out.print("Welcome "+request.getParameter("uname"));  
   String driver=application.getInitParameter("dname");  
   out.print("driver name is="+driver);  
All JSP Examples at JSP Source Code Examples