You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Pawson, David" <Da...@rnib.org.uk> on 2005/03/22 15:13:55 UTC

url of caller?

Is it possible to determine the url of the webpage
from which a particular servlet was called please?
I.e. the target of a 'back' action on the browser?

public java.lang.String getRequestURI() is the 'current'
page, I need the calling page.

Regards DaveP.

**** snip here *****

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: url of caller?

Posted by PA <pe...@gmail.com>.
On Mar 22, 2005, at 15:13, Pawson, David wrote:

> public java.lang.String getRequestURI() is the 'current'
> page, I need the calling page.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.36

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: url of caller?

Posted by Mike Fowler <to...@mlfowler.com>.
DaveP,

You could use the 'referer' header, eg.

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

Note that the String is null if the header isn't present which usually 
indicates that the user typed the URL in their browser.

Hope this helps!

--
Mike Fowler
Registered Linux user: 379787

"I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it"

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: url of caller?

Posted by Mark Benussi <ma...@hotmail.com>.
Worth mentioning this as I have been down this path.........

Symantec Intenet Security products and the like, will remove this header. I 
actually contemplated writing to Symantec about this only this morning (I 
think I have too much time on my hands).

http://service1.symantec.com/SUPPORT/nip.nsf/docid/2002042913273736?Open&src=&docid=2002110811290836&nsf=nip.nsf&view=docid&dtype=&prod=&ver=&osv=&osv_lvl=

(Search for Referrer)

http://service1.symantec.com/SUPPORT/nip.nsf/docid/2002110811290836?Open&src=&docid=2002042913273736&nsf=nip.nsf&view=docid&dtype=&prod=&ver=&osv=&osv_lvl=

----Original Message Follows----
From: "Pawson, David" <Da...@rnib.org.uk>
Reply-To: "Tomcat Users List" <to...@jakarta.apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Subject: url of caller?
Date: Tue, 22 Mar 2005 14:13:55 -0000

Is it possible to determine the url of the webpage
from which a particular servlet was called please?
I.e. the target of a 'back' action on the browser?

public java.lang.String getRequestURI() is the 'current'
page, I need the calling page.

Regards DaveP.

**** snip here *****

--
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is
confidential and may be privileged.  If you are not the intended
recipient you should not use, disclose, distribute or copy any of the
content of it or of any attachment; you are requested to notify the
sender immediately of your receipt of the email and then to delete it
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org