----- Original Message -----
From: Hans Bergsten <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 09, 1999 12:45 PM
Subject: Re: How do you send them back to where they came from?
> "Beheshti, Reza" wrote:
> >
> > Hi,
> > I am relatively new to JSP and Servlet, so forgive me if this is a
trivial
> > question.
> > I dogged thru the servelt API and did not find anything in "req" object
> > where I can figure out the URL of the req.
> > I need to be able to (in the servelet) figure out the origin URL of a
> > request, so after I process the request in the servlet, I can send it
> > back/redirect it to the same exact page/URL that it came from.
>
> If the information is available (no guarantees) it's available as the
> "Referer" header, so req.getHeader("Referer") works.
That is not correct. The http header Referer is a back-link to a document
that the user was in before visiting the current link.
I think the intent of the poster was to retrieve the url that the user
submitted to get to the current page (servlet), which, just like CGI, is
available as either getPathInfo or getPathInfoTranslated.
For a list of all available api's and their values, try out the SnoopServlet
available in almost every servlet development kit.
-tg
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".