Friday, 11 January 2013

Print cluster member hostname from with a JSP


<html>

<head>
</head>
<body>
<%@ page import="java.net.InetAddress" %>
This is a test from Hello.jsp<br>
<%
    InetAddress ia = InetAddress.getLocalHost();
    out.println("hostname  " + ia.getHostName() +  "<br>");
%>
</body>
</html>


No comments:

Post a Comment