| Author |
redirecting to some sessionExpired.jsp after sessiontimeout?
|
pavan mandala
Greenhorn
Joined: Jun 06, 2008
Posts: 5
|
|
Dear all, Can anyone post code for redirecting a jsp to some sessionexpired.jsp after session timeout urgently ?? Thanks in advance
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
Originally posted by pavan mandala: Dear all, Can anyone post code for redirecting a jsp to some sessionexpired.jsp after session timeout urgently ?? Thanks in advance
We cannot do it urgently. You need to elaborate on your requirement. Based on that this can be a solution from a JS or a container. JSPs should not redirect
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56157
|
|
|
Please read this for more information.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
pavan mandala
Greenhorn
Joined: Jun 06, 2008
Posts: 5
|
|
|
Our application was developed using only servlets and jsp. If user accesses a jsp and leaves the web page without closing and if he tries to access the page after session timeout time defined in web.xml, Im getting a javascript error "unknown runtime error" . Can anyone tell how to handle this?
|
 |
pavan mandala
Greenhorn
Joined: Jun 06, 2008
Posts: 5
|
|
|
My jsp's have ajax code to fetch some data from server.
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
Originally posted by pavan mandala: My jsp's have ajax code to fetch some data from server.
Post the exception here and give us a more detailed version of your problem to attract better responses
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
The approach I take, is to bind an object (say "userBean") to session when the user logs in. With each request, check for the existence of userBean in session. If it is not there (null), forward or redirect to a session expired page. Filters make it easy to add this functionality to an existing application without needing to add code to every component.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: redirecting to some sessionExpired.jsp after sessiontimeout?
|
|
|