当前位置: 代码迷 >> Java Web开发 >> [原创]jsp调用net包获得对方ip机器名
  详细解决方案

[原创]jsp调用net包获得对方ip机器名

热度:91   发布时间:2006-05-18 14:18:00.0
[原创]jsp调用net包获得对方ip机器名
<HTML>
<HEAD>
<TITLE>Who Am I?</TITLE>
<%@ import ="java.net.*" %>
</HEAD>
<BODY>
<%
InetAddress localHost = InetAddress.getLocalHost();
Date localTime = new Date();
%>
<H1>
Who Am I?
</H1>
I am called <%= localHost.getHostName() %> (<%= localHost.getHostAddress() %>).<br>
This page last executed at <%= localTime.toString() %>.
</BODY>
</HTML>
搜索更多相关主题的帖子: jsp  机器  

----------------解决方案--------------------------------------------------------
  相关解决方案