Wrox Programmer Forums
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2005, 06:33 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default session expiry

Can anybody guide me to write a piece of code for session management in a .java, i am expected to show index.jsp with the message saying ur session is expired please relogin once again, i am not able to construct the path to show the index.jsp.

 
Old February 17th, 2005, 02:48 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What do you mean by construct the path?
If you want to return the user to the login/front page insert a redirect statement in your code. I use the following line:

response.sendRedirect("login.jsp?loginFailed=true" );

In this example login.jsp accepts a parameter, 'loginFailed'.
When the page opens with this parameter set to true an error message will appear, if false there is no error message. Obviously you will need to code a test for the parameter and display the relevant message in login.jsp (or index.jsp in your case).






Similar Threads
Thread Thread Starter Forum Replies Last Post
change cookie expiry ab_dev Beginning PHP 0 March 9th, 2006 07:21 PM
Page expiry Problem gaurav_jain2403 ASP.NET 1.0 and 1.1 Professional 5 February 24th, 2006 08:27 PM
Automatic Expiry of Page problem. gaurav_jain2403 VS.NET 2002/2003 0 February 6th, 2006 02:04 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM
asp.net webpage expiry? imsuneeta General .NET 1 January 8th, 2005 08:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.