By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,122 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

How to capture the session status

P: n/a
I am using jsp for my web based application.
All participants enter through login password provided to them.
Is it possible to capture the session status information(connected,
disconnected time etc.)

Anks
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Yep, in your servlet like this:

----------------------
HttpSession session = request.getSession();

MyUserSession userSession = new MyUserSession();

/* code to load the userSession object with session info goes here */

session.setAttribute("userSession", userSession);

---------------------------------

MyUserSession is just an example of the class that you'd use to store user
session info. You would access the user object later like this:

MyUserSession userSession = (MyUserSession)
session.getAttribute("userSession");

Larry

"anks" <an***@4cplus.com> wrote in message
news:ab*************************@posting.google.co m...
I am using jsp for my web based application.
All participants enter through login password provided to them.
Is it possible to capture the session status information(connected,
disconnected time etc.)

Anks

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.