I can set the variable in the session, but how can I get the redirected site to the session. The way my authentication is working is this.
I have a form, that passes the form variables to a servlet. Once authenticated, it gets send the authenticated part of the site. If I click on a page where the session = null, it will re-direct me to the login page, which will then do what I stated above SO how do I get the URL page?? -----Original Message----- From: Matt Penner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 11:35 AM To: [EMAIL PROTECTED] Subject: Re: Looking for a little help Anthony, If you have access to the Jason Hunter Servlet book (2nd Ed.) he has an example on this very function. If I remember right (I dont' have it with me here) he does somethings along the lines of this. Create a session for the user if necessary and then add a variable to it with the url to the page. When the logon page is processed, upon a valid login the servlet looks for this redirect variable and if it exists it deletes it and then redirects the user to it. Hope this helps, ~Matt Quoting "G.Nagarajan" <[EMAIL PROTECTED]>: > hi, > > maybe something like this > > ... > if (session expired) > var thisPageURL = "/dir/pag.jsp"; > > redirect to Login.jsp?showPage="/dir/page.jsp" > > and the login controller can read the showPage parameter along with > the user name and password.After checking the data, it can forward > to the required page. > > I use a similar logic using javascript to send the user to a main > frame if he comes to a child frame. > > HTH > > nagarajan. > > > -----Original Message----- > From: A mailing list for discussion about Sun Microsystem's Java > Servlet > API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of > Anthony Diodato > Sent: Wednesday, January 30, 2002 5:14 PM > To: [EMAIL PROTECTED] > Subject: Looking for a little help > > > Here is what Im trying to do. > I have a website that is using form based authentication, and is > verifying > the session on everypage. > > If the session is null, Im sending them back to the login page, > otherwise > displaying the page. > > What I want to do is this, > If someone has a page bookmarked, I want to capture that bookmarked > page, > re-direct them to the login page, then redirect them back to the page > they > initially wanted. > Any suggestions would be greatly appreciated. > Thanks > Tony > > Anthony Diodato > Webmaster - IT > Prophet 21, Inc. > 19 West College Avenue > Yardley, PA 19067 > 1-800-776-7438, ext. 4600 > Fax: 215-321-8014 > [EMAIL PROTECTED] > http://www.p21.com/ > Prophet 21 -- Powering the Distribution Industry for the Digital Age > > For the latest press releases from Prophet 21 -- > http://www.p21.com/press/press.html > * 2/12/2001 - Trading Partner Connect Offers > Enterprise-to-Enterprise > (E2E) Commerce > * 2/9/2001 -- Prophet 21 CommerceCenter 8.0 is Now Available > * 2/9/2001 -- Prophet 21 Upgrades and Enhances Prophet 21 > Acclaim > For the latest articles on Prophet 21 > http://www.manufacturing.net/magazine/id/archives/2001/ind010.02/techupdate. > htm > http://www.manufacturing.net/magazine/id/develop/techmain01.1.htm > http://www.manufacturing.net/magazine/id/archives/2000/ind1201/news.htm > > > > > Visit our website at http://www.p21.com/visit > The information in this e-mail is confidential and may contain legally > privileged information. It is intended solely for the person or entity > to > which it is addressed. Access to this e-mail by anyone else is > unauthorized. If you are not the intended recipient, any disclosure, > copying, distribution, action taken, or action omitted to be taken in > reliance on it, is prohibited and may be unlawful. If you received > this > e-mail in error, please contact the sender and delete the material from > any > computer. > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: > http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: > http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html Visit our website at http://www.p21.com/visit The information in this e-mail is confidential and may contain legally privileged information. It is intended solely for the person or entity to which it is addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, action taken, or action omitted to be taken in reliance on it, is prohibited and may be unlawful. If you received this e-mail in error, please contact the sender and delete the material from any computer. ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
