This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes handling  the  Session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "handling  the  Session " Watch "handling  the  Session " New topic
Author

handling the Session

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
How i handle the Session for different Browsers ?
dimpsonu arora
Ranch Hand

Joined: Aug 13, 2003
Posts: 51
Dear,
What my knowledge is we handle sessions in the same way for all browser when using JSP.
By default it is set to true.
<%@ page session="true" %>
<%
session.setAttribute("name","abc");
session.setAttribute("address","xyz");

String name=(String) session.getAttribute(name);
String add=(String) session.getAttribute(address);
%>
This is how we handle sessions.If you don't want a session you explicit need to define session="false" in page directive.
 
Consider Paul's rocket mass heater.
 
subject: handling the Session
 
Similar Threads
Alternative to Cookie?
Field set in action method coming null in JSP
Session problem in NetBeans
Advice on persisting complex state across multiple server trips
ASP