tags:

views:

19

answers:

1

Here are three log exmaples:

127.0.0.1 - - [17/Sep/2010:14:03:07 +0800] "GET /docs/logging.html HTTP/1.1" 200 24040 "http://localhost:8000/docs/manager-howto.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
0:0:0:0:0:0:0:1 - - [26/Oct/2010:09:53:30 +0800] "GET /docs/images/tomcat.gif HTTP/1.1" 200 1934 "http://localhost:8000/docs/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
0:0:0:0:0:0:0:1 - - [26/Oct/2010:09:53:30 +0800] "GET /docs/images/asf-logo.gif HTTP/1.1" 200 7279 "http://localhost:8000/docs/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"

The first is correct,however the ip of the second and the third is ipv6 format, how to avoid this?

A: 

I've observed on my Tomcat 6.0.20 that the ipv6 address is shown when I access it as localhost:8080 whereas the ipv4 (i.e. the dot-decimal notation) is shown when I access it using the ip address or server name

Any remote user accessing the URL will also show ipv4 notation.

via IP address or domain name

172.x.x.x - - [26/Oct/2010:11:19:50 +0530] "GET /examples/servlets/servlet/RequestParamExample HTTP/1.1" 200 665

via localhost

0:0:0:0:0:0:0:1 - - [26/Oct/2010:11:20:54 +0530] "GET /examples/servlets/servlet/HelloWorldExample HTTP/1.1" 200 359

Does it work the same for you?

JoseK
Thanks for reply. I always access the site using localhost:port,and I did not found this problem until yesterday. But I did not change anything to the tomcat and my browser.
hguser