Config Implicit Object

Google Advertisements

Response Implicit Object JSP Page Implicit Onject in JSP

Config Implicit Object

config object is an implicit object of type ServletConfig and it is created by the container, whenever servlet object is created. This object can be used to get initialization parameter for a particular JSP page.

config object is created by the web container for every jsp page. It means if a web application has three jsp pages then three config object are created.

In jsp, it is not mandatory to configure in web.xml. If we configure a JSP in web.xml then the logical name and init parameter given in web.xml file are stored into config object by the container.

config object is accessible, only if the request is given to the jsp by using its url pattern, but not with name of the jsp.

config object is accessible, only if the request is given to the jsp by using its url pattern, but not with name of the jsp.

Example of config implicit object

index.html

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

web.xml file

<web-app>  
  
<servlet>  
<servlet-name>Home</servlet-name>  
<jsp-file>/welcome.jsp</jsp-file>  
  
<init-param>  
<param-name>dname</param-name>  
<param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>  
</init-param>  
  
</servlet>  
  
<servlet-mapping>  
<servlet-name>Home</servlet-name>  
<url-pattern>/welcome</url-pattern>  
</servlet-mapping>  
  
</web-app>  

welcome.jsp

<%  
out.print("Welcome "+request.getParameter("uname"));  
  
String driver=config.getInitParameter("dname");  
out.print("driver name is="+driver);  
%> 

Response Implicit Object JSP Page Implicit Onject in JSP

Google Advertisements

Buy This Ad Space @$50 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

Download Projects

Adsense Advertisements


Buy This ads Space 8076671483

Buy This Ad Space @$120 per Month, Ad Size 300X600 Contact on: hitesh.xc@gmail.com or 8076671483 Try this Keyword C++ Programs