List Info

Thread: client IP problem




client IP problem
user name
2006-08-07 09:16:08
Hello
 ;        I want to check clients IP address and DNS and pass it to my service, say Adder which is offering add( Integer x, Integer y ) method. For this I have written a servlet which extends XmlRpcServlet. In doPost method I get client ip from request object and store it in some class as static data member. And in Add class I call that static method to get client IP.
 ;        Now in case of one client it works fine but when more than one clients come, there may be chance to over write clients ip. Because In My Servlet in doPost method two statements are used
         ;       IPAddress.setIp (pRequest.getRemoteAddr());
           ;     server.execute(pRequest, pResponse);

Suppose two clients come. For first client say setIp is called and control moves forward. In the mean time for second client setIp is called before Adder's add method is called for first client. Now When I'll get IP of first client in add method for first client, it is not valid now and IP of second client is there ...

         Can any one suggest better solution. I tried a solution  on

Regards
Rafaqat Ali
client IP problem
user name
2006-08-24 23:04:05
Rafaqat Ali wrote:

>          I want to check clients IP address and DNS and
pass it to my 
> service, say Adder which is offering add( Integer x,
Integer y ) method. 

See

http://svn.apache.org/view
vc/webservices/xmlrpc/trunk/src/site/fml/faq.fml?view=markup




------------------------------------------------------------
---------
To unsubscribe, e-mail: xmlrpc-user-unsubscribews.apache.org
For additional commands, e-mail: xmlrpc-user-helpws.apache.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )