A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Redirecting to the same jsp page
Joined: Sep 07, 2007
Sep 03, 2008 21:18:00
I have 10 pages in my application and each page has a log in section.
So when the user tries to log in from any any of these 10 pages, i want to redirect the user to the same page.
is there a way in
to find from which jsp page the request comes or what is the best way to do it?
SCJP 1.5, SCWCD 1.4.
Hanging between Web Services and EJB
Author and ninkuma
Joined: Jan 10, 2002
Sep 03, 2008 21:40:00
You're doing it the hard way. Why have a login on each page?
Rather, check for authentication in a servlet filter. If the user is not logged in, record the URL in the session and forward to a single login page. After login, redirect to the stored URL.
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: Redirecting to the same jsp page
session vulnerable pages
help required on access managment of jsp pages
Flushing Output Stream (s2)
Displaying Buttons on same JSP page after submition of data
JSP Session and validation
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014