Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-23-2008, 08:07 AM
Member
 
Join Date: Dec 2008
Location: Bangalore
Posts: 4
Rep Power: 0
dpk_vash is on a distinguished road
Default How do I create session for a user when S/he login and expire the session.
Hi all,

I am going to make a session for a user when he logs in the s/w and want to expire the session when he logs out..

I am using following:
1. Netbeans IDE
2. Struts framework.
3. SQL Server Express 2005

Also want to use hibernate in the same application, but firstly I need your help to create session in Struts framework.

Please give me some suggestions for making the same...

Thanks in advance...
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 12-23-2008, 10:05 AM
Senior Member
 
Join Date: Dec 2008
Location: Hong Kong
Posts: 473
Rep Power: 2
mtyoung is on a distinguished road
Default
in web.xml
add listener tag
that class should implements HttpSessionListener

once user browse your page, session will be created to the user...

expire session... plz read httpseesion class in jee api

Last edited by mtyoung; 12-23-2008 at 10:20 AM.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-23-2008, 07:35 PM
Member
 
Join Date: Dec 2008
Location: Bangalore
Posts: 4
Rep Power: 0
dpk_vash is on a distinguished road
Default
Thanks...

I am trying it..

If any prob would come I'll contact you..

Thank you very much...
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] logout user when session expires sanjeevtarar Java Servlet 12 02-23-2010 01:53 PM
how to create session in jsp sandip_ingle21 JavaServer Pages (JSP) and JSTL 2 12-11-2008 12:28 PM
Login user name - for all platforms. Eranga Advanced Java 0 03-17-2008 06:45 AM
how to expire a session in struts without using cookies sathya_k_83 JavaServer Pages (JSP) and JSTL 0 11-22-2007 03:07 PM


All times are GMT +2. The time now is 07:23 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org