Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > setting ip & referer in tomcat

Reply
Thread Tools

setting ip & referer in tomcat

 
 
Amir Michail
Guest
Posts: n/a
 
      12-23-2006
Hi,

Is there an easy way to set arbitrary ips and referers on-the-fly as
the app runs in tomcat?

This is information that would be obtained by the servlet using
HttpServletRequest.getHeader(..).

Amir

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      12-23-2006
Amir Michail wrote:
> Is there an easy way to set arbitrary ips and referers on-the-fly as
> the app runs in tomcat?
>
> This is information that would be obtained by the servlet using
> HttpServletRequest.getHeader(..).


Referrer is set by the browser and read by the server.

What do you really want to do ?

Arne
 
Reply With Quote
 
 
 
 
Amir Michail
Guest
Posts: n/a
 
      12-23-2006
Arne Vajh°j wrote:
> Amir Michail wrote:
> > Is there an easy way to set arbitrary ips and referers on-the-fly as
> > the app runs in tomcat?
> >
> > This is information that would be obtained by the servlet using
> > HttpServletRequest.getHeader(..).

>
> Referrer is set by the browser and read by the server.
>
> What do you really want to do ?
>
> Arne


I would like to set up a convenient environment for development of a
web app that makes use of this information without actually having to
use different IPs to do the testing. While testing the application, I
would like to be able to change on-the-fly what
HttpServletRequest.getHeader(..) returns.

Amir

 
Reply With Quote
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      12-23-2006
Amir Michail wrote:
> Arne Vajh°j wrote:
>> Amir Michail wrote:
>>> Is there an easy way to set arbitrary ips and referers on-the-fly as
>>> the app runs in tomcat?
>>>
>>> This is information that would be obtained by the servlet using
>>> HttpServletRequest.getHeader(..).

>> Referrer is set by the browser and read by the server.
>>
>> What do you really want to do ?

>
> I would like to set up a convenient environment for development of a
> web app that makes use of this information without actually having to
> use different IPs to do the testing. While testing the application, I
> would like to be able to change on-the-fly what
> HttpServletRequest.getHeader(..) returns.


Set the header in your client test code then.

URLConnection has a setRequestProperty method that can
do such things.

Whatever you are using on top of that for testing may
have equivalent capability.

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting Referer for urllib.urlretrieve samwyse Python 3 09-04-2009 11:31 PM
setting the referer with css Nospam HTML 2 09-26-2006 02:54 PM
tomcat 4.x : setting mime type for a directory or setting a default mime type CJ Java 1 10-29-2004 07:51 PM
How do I clear the "Referer" header? =?Utf-8?B?TWlsYW4gTmVnb3Zhbg==?= ASP .Net 4 08-18-2004 11:56 PM
Re: How to Spoof Referer URL dave wanta ASP .Net 1 07-07-2003 07:46 AM



Advertisments