ok nick,i have not tried this but i am sure it'll lead u somewhere.u see tomcat has a 
log file called access_log in the logs dir .in this file the IP address of the 
requesting m/c is logged.this acces_log is an entry in server.xml.what u could 
probably do is create a log file of ur own (say client.log) and configure this file in 
server.xml.u can then read the IP address by parsing it (use XML).i hope this helps

ravi

On Mon, 03 Sep 2001 Nick Flowers wrote :
>Hi Ravi,
>
>Any idea how I do it from the server.xml config 
>file? I'm not a java programmer, and have a 
>legacy program I'm trying to get up to security
>spec. Cheers, Nick.
>
>-----Original Message-----
>From: ravi shankar [mailto:[EMAIL PROTECTED]]
>Sent: 03 September 2001 12:25
>To: [EMAIL PROTECTED]
>Subject: Re: Logging the IP addresses of page requests
>
>
>
>hi nick,
>
>try request.getRemoteHost()
>    request.getRemoteAddress() etc etc
>
>look up the servlet api for more info
>
>ravi
>
>On Mon, 03 Sep 2001 Nick Flowers wrote :
>>Hi,
>>
>>Anyone know how to do this for a standalone
>>Tomcat server? v3.2?
>>
>>Cheers, Nick.
>>
>>ps: If you know how to log just the username, and
>>    not username+pw for authentication that would
>>    be useful to know too. Thanks.
>>
>>--
>>Nick Flowers
>>Systems Manager
>>s h o p s m a r t . c o m
>>Tel: +44 (0) 20 8208 8859/dl
>>Tel: +44 (0) 20 8208 8800/sb
>>Fax: +44 (0) 20 8208 8899/fx
>>http://www.shopsmart.com
>>
>>E-mail disclaimer:
>>_______________________________________________________-
>_-
>>____________________
>>This message and any attachments are confidential and 
>>may be legally
>>privileged. Any opinion expressed in them may be 
>>personal to the author and
>>may not be shared by ShopSmart Ltd.If you are not the 
>>intended recipient you
>>must not disclose the contents to any other person. 
>>Please delete this
>>message and  any attachments if received in error and 
>>e-mail the sender or
>>contact ShopSmart Ltd on +44 (0) 20 8 208 8800. Thank 
>>you.
>>_______________________________________________________-
>_-
>>____________________
>>ShopSmart Ltd, Company No: 03711211
>>Reg. Address: Britannia Business Centre, Cricklewood 
>>Lane, London NW2 1DZ
>>_______________________________________________________-
>_-
>>____________________
>
>
> 
>
>
>E-mail disclaimer:
>________________________________________________________-
>____________________
>This message and any attachments are confidential and 
>may be legally
>privileged. Any opinion expressed in them may be 
>personal to the author and
>may not be shared by ShopSmart Ltd.If you are not the 
>intended recipient you
>must not disclose the contents to any other person. 
>Please delete this
>message and  any attachments if received in error and 
>e-mail the sender or
>contact ShopSmart Ltd on +44 (0) 20 8 208 8800. Thank 
>you.
>________________________________________________________-
>____________________
>ShopSmart Ltd, Company No: 03711211
>Reg. Address: Britannia Business Centre, Cricklewood 
>Lane, London NW2 1DZ
>________________________________________________________-
>____________________


 



Reply via email to