AKS: Boban Acimovic wrote:

> Is there any way to check from what URL is servlet called?
> Something like document.referrer in JavaScript.
>
> I checked SnoopServlet and all getRemote... methods, but it seems nothing is there.
> I didn't check JSDK 2.1 yet.
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>

String referer = request.getHeader("Referer");

You'd see this listed in the output from SnoopServlet (under the HTTP Headers section)
if you create a page with a link to the snoop servlet, and then executed it.  If you
just type in the URL yourself, this header is not included (and the value above will
return null) because there was, in fact, no referring page.

Craig McClanahan

___________________________________________________________________________
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

Reply via email to