You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Ilan Azbel <ia...@mdio.net> on 2004/09/29 13:26:23 UTC

Referrer variable

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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Referrer variable

Posted by Howard Lin <xu...@gmail.com>.
How about data.getRequest().getHeader("Referer") ?

Howard

On Wed, 29 Sep 2004 15:38:34 +0200, Ilan Azbel <ia...@mdio.net> wrote:
> 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:aoslund@bevcomm.net]
> > 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" <ia...@mdio.net>
> > To: "Turbine Users List" <tu...@jakarta.apache.org>
> > 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:jh@byteaction.de]
> > >> 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: turbine-user-unsubscribe@jakarta.apache.org
> > >> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >> >
> > >> >
> > >> > !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: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> > ---
> 
> 
> > 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: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
>

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


Re: Referrer variable

Posted by Tony Oslund <ao...@bevcomm.net>.
This is correct, the HTTP_REFERER is not guaranteed to be in the header.

If you search for REFERER in the following doc it points this out. 
http://httpd.apache.org/docs/misc/FAQ.html. (Thank you Robert Fuess at 
Digital Point Forums).

Ilan wanted to know how to access this value so I didn't want to stop him. 
Depending upon his environment and what he is doing it may or may not give 
him the desired result.  He seemed pretty confident and direct so I assumed 
that he knew about its limitations.

By the way, this is not a Turbine limitation, but apparantly (based on 
various comments) can be caused by the browser (as you stated), proxy 
servers, ssl, dhtml, and numerous other real (or imagined) culprits ;-).

----- Original Message ----- 
From: "Brian Lawler" <br...@daflink.net>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Tuesday, October 05, 2004 7:28 PM
Subject: Re: Referrer variable


> 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:aoslund@bevcomm.net]
>>> 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" <ia...@mdio.net>
>>> To: "Turbine Users List" <tu...@jakarta.apache.org>
>>> 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:aoslund@bevcomm.net]
>>>>> 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" <ia...@mdio.net>
>>>>> To: "Turbine Users List" <tu...@jakarta.apache.org>
>>>>> 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:jh@byteaction.de]
>>>>>>> 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:
>>> turbine-user-unsubscribe@jakarta.apache.org
>>>>>>>> For additional commands, e-mail:
>>>>>>>> turbine-user-help@jakarta.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>> !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: turbine-user-unsubscribe@jakarta.apache.org
>>>>>> For additional commands, e-mail: 
>>>>>> turbine-user-help@jakarta.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------------------- 
>>>>> -
>>>>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail:  turbine-user-help@jakarta.apache.org
>>>>>
>>>>> ---
>>>>> 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: turbine-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>>
>>> ---
>>> 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: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 



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


Re: Referrer variable

Posted by Brian Lawler <br...@daflink.net>.
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:aoslund@bevcomm.net]
>> 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" <ia...@mdio.net>
>> To: "Turbine Users List" <tu...@jakarta.apache.org>
>> 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:aoslund@bevcomm.net]
>>>> 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" <ia...@mdio.net>
>>>> To: "Turbine Users List" <tu...@jakarta.apache.org>
>>>> 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:jh@byteaction.de]
>>>>>> 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:
>> turbine-user-unsubscribe@jakarta.apache.org
>>>>>>> For additional commands, e-mail:
>>>>>>> turbine-user-help@jakarta.apache.org
>>>>>>>
>>>>>>>
>>>>>>> !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: turbine-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail:  
>>>>> turbine-user-help@jakarta.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:  
>>>> turbine-user-help@jakarta.apache.org
>>>>
>>>> ---
>>>> 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: turbine-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>> ---
>> 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: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


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


RE: Referrer variable

Posted by Ilan Azbel <ia...@mdio.net>.
Thanks, this worked!!


> -----Original Message-----
> From: Tony Oslund [mailto:aoslund@bevcomm.net]
> 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" <ia...@mdio.net>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> 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:aoslund@bevcomm.net]
> >> 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" <ia...@mdio.net>
> >> To: "Turbine Users List" <tu...@jakarta.apache.org>
> >> 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:jh@byteaction.de]
> >> >> 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:
> turbine-user-unsubscribe@jakarta.apache.org
> >> >> > For additional commands, e-mail:
> >> >> > turbine-user-help@jakarta.apache.org
> >> >> >
> >> >> >
> >> >> > !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: turbine-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >> >
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >>
> >> ---
> >> 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: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---
> 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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Referrer variable

Posted by Tony Oslund <ao...@bevcomm.net>.
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" <ia...@mdio.net>
To: "Turbine Users List" <tu...@jakarta.apache.org>
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:aoslund@bevcomm.net]
>> 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" <ia...@mdio.net>
>> To: "Turbine Users List" <tu...@jakarta.apache.org>
>> 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:jh@byteaction.de]
>> >> 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: turbine-user-unsubscribe@jakarta.apache.org
>> >> > For additional commands, e-mail: 
>> >> > turbine-user-help@jakarta.apache.org
>> >> >
>> >> >
>> >> > !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: turbine-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>> ---
>> 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: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 



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


RE: Referrer variable

Posted by Ilan Azbel <ia...@mdio.net>.
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:aoslund@bevcomm.net]
> 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" <ia...@mdio.net>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> 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:jh@byteaction.de]
> >> 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: turbine-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >> >
> >> >
> >> > !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: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---
> 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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Referrer variable

Posted by Tony Oslund <ao...@bevcomm.net>.
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" <ia...@mdio.net>
To: "Turbine Users List" <tu...@jakarta.apache.org>
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:jh@byteaction.de]
>> 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: turbine-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>> >
>> >
>> > !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: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 



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


RE: Referrer variable

Posted by Ilan Azbel <ia...@mdio.net>.
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:jh@byteaction.de]
> 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: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
> > !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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Referrer variable

Posted by Ilan Azbel <ia...@mdio.net>.
I see that this class is deprecated. Any non-deprecated way of accessing
this info? I cannot imagine that there isn't a simple way to access the
environment variables?!?!



> -----Original Message-----
> From: Jürgen Hoffmann [mailto:jh@byteaction.de]
> 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: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
> > !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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Referrer variable

Posted by Jürgen Hoffmann <jh...@byteaction.de>.
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: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> 
> !EXCUBATOR:415a9acb25903968274084!