| Author |
redirecting page
|
suman vasireddy
Greenhorn
Joined: Nov 17, 2008
Posts: 12
|
|
|
hi im new to session concept...i just want to redirect my page to login page after my session expires so please help me out how to do this in jsp....
|
 |
Somesh Rathi
Ranch Hand
Joined: Apr 27, 2006
Posts: 31
|
|
|
Check for session timeout in JSP inside scriplet code (you can find relevant method to check for timeout in javadoc - getMaxInactiveInterval()) . In case session timeout/remain inactive for defined time interval , redirect it to login page using the sendredirect()of HTTPServletResponse.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
|
|
|
Rather than putting Java code in scriptlets (a poor practice at this point) employ a servlet filter to do the check for you before any JSP is even invoked.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: redirecting page
|
|
|