表单传值错误
MyEclipse 无法自动编译

JSP获取客户端IP地址

Jimmy posted @ 2012年2月22日 00:25 in JSP+MySQL , 2241 阅读

正在做一个交互式网站,需要记住用户的IP来生成user profile,使用JSP的response.getRemoteAddr()可以做到,但是在网上查资料后发现这种方法解决不了客户端使用代理软件来访问网站的问题,这篇文章给出了很好的解决办法:

http://blog.csdn.net/maxracer/article/details/6118460

但是使用上述方法,会出现记录的IP地址为 0:0:0:0:0:1,出现会误以为是IPv6的地址,其实是客户端与服务器使用同一机器的原因,将主机名localhost改为真实IP地址就不会出现这个问题了。这篇文章给出了详细的分析

http://java161.iteye.com/blog/1189279

Avatar_small
gmail email login 说:
2021年1月05日 23:23

Even when you are quite good at using internet or email, you may have problems with it. Some problems are quite common and you can solve it (forgot password, forgot username...) but sometimes, because of the high secure policy of Google, proxy problems... you may cannot sign in your email. If you cannot solve it yourself, gmail email login will be a helpful choice.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter