Rajesh,

1) If the user clicks the 'back' button of the browser and tries to do some other 
operation , I want to show him a page
   telling his session has expired. How can I achieve it ?

===> When user logs in, you can create one Session variable saying "user loggedin" and 
check for this session variable every time when you are displaying pages. If you don't 
find this variable in the session then send him back to login page or 
session-expired-page.

When user logs out, remove this variable from the session.

2) I am planning to set a small interval of time to "InactiveInterval"
for security reasons. Now if the user leaves the page more than that time and then 
tries to

===> One way of handling this situation is, keep the session idle time in application 
server property file to the your-allowed-security-time. By default it would be 30 
minutes. This session idle time kills the session and it resources if the user idle 
time exceeds the session idle time.

 (1) logic also helps here to send the user to custom page.

Thanks,
~Hemu Naidu


-----Original Message-----
From: Rakesh Bhat [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 03, 2000 8:25 AM
To: [EMAIL PROTECTED]
Subject: Session questions


Hi all,

I have employed the  model 1 architecture for building my application.
I have few jsp pages and each jsp page is associated with a java class
file which inturn calls the beans.
I create a session for the user in the first page (say login page) and
invalidate this session in logout page.
When the user logs out , i show him a page indicating the successful
logout and invalidate the session.

My question is ->

1) If the user clicks the 'back' button of the browser and tries to do
some other operation , i want to show him a page
   telling his session has expired. How can i achieve it ?

2) I am planning to set a small interval of time to "InactiveInterval"
for security reasons.
   Now if the user leaves the page more than that time and then tries to

do some operation on that page , i want to show
   him a page telling his session has expired. How can i achieve it ?


Also , if u can give me your views on above architecture(jsp-> java
class ->java bean) , that would be of great help.




Thx in advance
Rakesh.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Get FREE Email/Voicemail with 15MB at Lycos Communications at http://comm.lycos.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to