jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brette, Marc" <Marc.Bre...@mkms.xerox.com>
Subject RE: Set the client IP address in a Cactus WebRequest
Date Mon, 06 May 2002 07:21:39 GMT
Is it a HTTP information ? good question, it could also be taken directly
from the socket layer.
Anyway, on the server side, I use :
String userIP =	pageContext.getRequest().getRemoteAddr() ;
so it is ServletRequest that gives this information.

-----Original Message-----
From: Vincent Massol [mailto:vmassol@octo.com]
Sent: 03 May 2002 21:48
To: 'Cactus Users List'
Subject: RE: Set the client IP address in a Cactus WebRequest


Hi Marc,

Hum ... The answer is probably yes. This information is passed in an
HTTP header right ? Then you should be able to use the
WebRequest.addHeader() (However that would only add a new header, not
replace an existing one).

How do you get the IP value on the server side (what API do you use ?).

Thanks
-Vincent

> -----Original Message-----
> From: Brette, Marc [mailto:Marc.Brette@mkms.xerox.com]
> Sent: 03 May 2002 14:03
> To: 'cactus-user@jakarta.apache.org'
> Subject: Set the client IP address in a Cactus WebRequest
> 
> Hi,
> Is it possible to fake the IP address of a client in a Cactus
WebRequest ?
> I have a servlet that check that the user IP address matches an
expected
> value and I would like to test it using Cactus.
> 
> Thanks,
> Marc


--
To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message