Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 16th, 2005, 06:33 AM
Registered User
Join Date: Feb 2005
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old February 17th, 2005, 02:48 PM
Friend of Wrox
Join Date: Jul 2004
Location: , , .
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts

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).

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 09:09 PM.

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