Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session tracking in Jsp

Status
Not open for further replies.

abyinsydney

Programmer
Feb 17, 2004
99
AU
Greetings Fellow citizens
I'm designing a JSP application where i need to create a session for a user.can any one in this group thro light on this issue.

how do i create a session for the user .after creating a session i need to create a button that on clicking on it the session expires.

Helping gestures would be kept on high esteem

kind regards
aby
 
HttpSession objects are created automatically by the servlet container when a browser hits a web application.

You can invalidate a session using the HttpSession.invalidate() method.
 
sedj

could you if possible send me the code please.It will help me visualise things

thanx
aby
 
<!-- client.jsp -->
<form method=&quot;post&quot; action=&quot;inval.jsp&quot; name=&quot;invalidate&quot;>
<input type=&quot;submit&quot;>
</form>



<!-- inval.jsp -->
<%
session.invalidate();
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top