But a word of caution, the referer is not a required header! It is encouraged "as a convenience to the back end" but not a required attribute of a request. We were bitten by this at tribe.net as I was relying on referer being there all the time which isn't true for all browsers. It turns out that we had a case of IE6 on Windows XP (or something like that) where the referer was not in fact being passed in.


On Sep 30, 2004, at 4:09 AM, Ilan Azbel wrote:

Thanks, this worked!!


-----Original Message-----
From: Tony Oslund [mailto:[EMAIL PROTECTED]
Sent: 29 September 2004 04:25
To: Turbine Users List
Subject: Re: Referrer variable


I believe that this is what you are looking for.

This info is contained in the request header and can be obtained
from there.

System.out.println("referrer = " +
data.getRequest().getHeader("referer"));

Enumeration e = data.getRequest().getHeaderNames();
while (e.hasMoreElements()) {
  String str = (String) e.nextElement();
  System.out.println(str);
}

----- Original Message -----
From: "Ilan Azbel" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 29, 2004 8:38 AM
Subject: RE: Referrer variable


This is not quote what I am looking for:

String query = data.getRequest().getQueryString();
this code gets the variable QUERY_STRING, not HTTP_REFERER

String destination = data.getRequest().getRequestURI();
I quote from the docs:
"Gets, from the first line of the HTTP request, the part of
this request's
URI that is to the left of any query string".

I thought this was going to be an easy question to answer, but
obviously I
was mistaken.

I am specifically looking for the value of the HTTP_REFERER
variable. Any
further help would be appreciated.

Thanks
Ilan


-----Original Message-----
From: Tony Oslund [mailto:[EMAIL PROTECTED]
Sent: 29 September 2004 03:27
To: Turbine Users List
Subject: Re: Referrer variable


You can get the information you are looking for from the request object...

            String query = data.getRequest().getQueryString();
            String destination = data.getRequest().getRequestURI();

----- Original Message -----
From: "Ilan Azbel" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 29, 2004 7:55 AM
Subject: RE: Referrer variable


I also see that this doesn't exatcly give me what I am looking for.
I am looking for the contents of the HTTP_REFERER variable.

Ilan


-----Original Message-----
From: Jürgen Hoffmann [mailto:[EMAIL PROTECTED]
Sent: 29 September 2004 02:36
To: Turbine Users List
Subject: Re: Referrer variable


Hi Ilan,

HttpUtils.getRequestURL(RunData.getRequest());

Kind regards
Jürgen Hoffmann

Am Mi, den 29.09.2004 schrieb Ilan Azbel um 13:26:

Hello, I am using Turbine with Velocity.

I am needing to get hold of the 'referrer' value (the value
that contains
the URL of the web page from which the user has clicked).

Which Turbine / Velocity class can I use to get hold of this?

Thanks
Ilan



---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


!EXCUBATOR:415a9acb25903968274084!

--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.769 / Virus Database: 516 - Release Date: 2004/09/24



------------------------------------------------------------------- --
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.769 / Virus Database: 516 - Release Date: 2004/09/24



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 2004/09/28



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to