怎样在jsp中获取登陆机的ip地址? 我看了这个方法,就是还没有用过,不知道对于使用代理的会有什么效果? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 得到本地主机的IP地址: InetAddress address = InetAddress.getLocalHost( ); request.getRemoteAddr(); request.getRemoteHost(); 获得给定主机名IP: InetAddress address = InetAddress.getByName("xxx.xxx.xxx"); address.getHostName(); InetAddress address = InetAddress.getByName("www.sohu.com"); 树形菜单 请大家给一个封装比较好的数据库连接的类,参考一下代码 国际化中设置了jsp页面是UTF-8了,为什么就不能够接受中文了? eclipse3.1.1+jakarta-tomcat-5.0.28 运行出错,新手 HOW TO在BOLG 中加入时间,日期,时钟(100高分求高手) java web网站URL分配问题 请问用java取用户主机名的方法,是用getlocalhost么? 求《jsp编程指南(第二版)〉一书所带的示例代码? 进入互联网行业,需要了解哪些知识 action中数据传递 如何刷新全部当前正在浏览页面的会话 Servlet调用问题
InetAddress address = InetAddress.getLocalHost( );
request.getRemoteAddr();
request.getRemoteHost();
获得给定主机名IP:
InetAddress address = InetAddress.getByName("xxx.xxx.xxx");
address.getHostName();
InetAddress address = InetAddress.getByName("www.sohu.com");