Session Implicit Object

Advertisements

Page Implicit Object Exception Implicit Object

Session Implicit Object

In JSP, session is an implicit object of type HttpSession.This object used to set,get or remove attribute or to get session information.

Example of Session implicit object

index.html

Example

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

welcome.jsp

Example

<%   
String name=request.getParameter("uname");  
out.print("Welcome "+name);  
  
session.setAttribute("user",name);  
  
<a href="second.jsp">second jsp page</a>  
  
%> 

One.jsp

Example

<%   

String name=(String)session.getAttribute("user");  
out.print("Hello "+name);  
  
%> 

Page Implicit Object Exception Implicit Object

Google Advertisment

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

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

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements