Application Implicit Object

Google Advertisements

Prev Tutorial Next Tutorial

Application Implicit Object

In JSP, application is an implicit object of type ServletContext. this application object in the Servlet programming is ServletContext.

For all jsp in a web application, there must be a single application object with application object we can share the data from one JSP to any other JSP in the web application.

The instance of ServletContext is created only once by the web container when application or project is deployed on the server.

This object can be used to get initialization parameter from configuration file (web.xml). It can also be used to get, set or remove attribute from the application scope.

Example of Application implicit object


<form action="welcome.jsp">  
<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); 



Prev Tutorial Next Tutorial

Download Projects

Adsense Advertisements
Free Classified Site – Bedpage

Yahoo Ads Advertisements