开发者

The result of "request.getRemoteAddr()" is different in different browsers

I'm learning JSP now. I tried to test a very simple sample JSP file, there is one line code inside: ... <% ... out.println("Your IP Address is : " + request.getRemoteAddr()); ... %> ...

I checked this JSP file, it works well, gives me expected information. But, only above code output is different in different browsers:

IE8/Google Chrome: the output is correct, for example, 192.168.214.161

But in Firefox/Opera: my locale ip address becomes to another one: 192.168.99.211.

I asked our network administrator, but 开发者_如何学编程no sure what this means, may be a mail server.

So, anybody can teach me why? Besides, my working environment is: Client side: WinXP; Server side: Windws Server 2003 R2/Apache Tocmat 5.5.17, JRE1.5.0_15.

Thanks in advance.


Perhaps your browsers have different proxy settings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜