setting ip & referer in tomcat

A

Amir Michail

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
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Amir said:
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
 
A

Amir Michail

Arne said:
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
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Amir said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top