Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

setting ip & referer in tomcat

Thread view: 
Amir  Michail - 23 Dec 2006 16:17 GMT
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
Arne Vajhøj - 23 Dec 2006 17:25 GMT
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
Amir  Michail - 23 Dec 2006 17:44 GMT
Arne Vajh?j wrote:
> Amir Michail wrote:
> > Is there an easy way to set arbitrary ips and referers on-the-fly as
[quoted text clipped - 8 lines]
>
> 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
Arne Vajhøj - 23 Dec 2006 18:24 GMT
Amir Michail wrote:
>> Amir Michail wrote:
>>> Is there an easy way to set arbitrary ips and referers on-the-fly as
[quoted text clipped - 11 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.