You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul Taylor <pa...@fastmail.fm> on 2004/11/10 18:30:33 UTC

Use of Referer header

I have a WebPage which can be called from two different webpages, and I 
wanted it to have a back button.

Originally I had the calling pages passing a parameter to tell the 
called page what called it. Then someone pointed
out <%=request.getHeader("REFERER")%> to m. This works much better.

But I have 2 questions:
1. Where are these header values defined I've not beeen able to find a 
good source.
2.  It worked when coming from my pages but I then tried going to 
another page (e.g www.sun.com) and then pasting in the url and it just 
returned null. Does referer only apply when hyperlink from another  page ?


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


[OT] Re: Use of Referer header

Posted by Ben Souther <bs...@fwdco.com>.
On Wed, 2004-11-10 at 12:52, Ben Souther wrote:
> The browser generates the HTTP headers and there are some rules
> governing when they are to be sent.
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
> 
> This isn't really Tomcat specific so I'm marking [OT]
> You may find more enthusiastic help on a JSP/Servlet list.
> 
> -Ben
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Wed, 2004-11-10 at 12:30, Paul Taylor wrote:
> > I have a WebPage which can be called from two different webpages, and I 
> > wanted it to have a back button.
> > 
> > Originally I had the calling pages passing a parameter to tell the 
> > called page what called it. Then someone pointed
> > out <%=request.getHeader("REFERER")%> to m. This works much better.
> > 
> > But I have 2 questions:
> > 1. Where are these header values defined I've not beeen able to find a 
> > good source.
> > 2.  It worked when coming from my pages but I then tried going to 
> > another page (e.g www.sun.com) and then pasting in the url and it just 
> > returned null. Does referer only apply when hyperlink from another  page ?
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 


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


Re: Use of Referer header

Posted by Ben Souther <bs...@fwdco.com>.
The browser generates the HTTP headers and there are some rules
governing when they are to be sent.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

This isn't really Tomcat specific so I'm marking [OT]
You may find more enthusiastic help on a JSP/Servlet list.

-Ben















On Wed, 2004-11-10 at 12:30, Paul Taylor wrote:
> I have a WebPage which can be called from two different webpages, and I 
> wanted it to have a back button.
> 
> Originally I had the calling pages passing a parameter to tell the 
> called page what called it. Then someone pointed
> out <%=request.getHeader("REFERER")%> to m. This works much better.
> 
> But I have 2 questions:
> 1. Where are these header values defined I've not beeen able to find a 
> good source.
> 2.  It worked when coming from my pages but I then tried going to 
> another page (e.g www.sun.com) and then pasting in the url and it just 
> returned null. Does referer only apply when hyperlink from another  page ?
> 
> 
> ---------------------------------------------------------------------
> 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