
Re: JSP question.
Within a JSP scriptlet (between the <% %>), one of the implicit objects is request. It represents the HttpServletRequest object, and has a few methods that may be of help:
getLocalName() returns the host name (of the interface where the request was received, which may be different than what was requested).
getLocalAddr() returns the IP address (of the local, receiving host)
getServerName() returns the host name of the host that was requested (which may not be the same as the host handling the request)
These are from the JSP 2.0 spec, but I believe that they were there for all of the older ones (though I didn't verify that).
As an example, if you wanted to get the local host (of the machine handling the request), you'd have something like this in your JSP page:
You are hitting host <%= request.getLocalName() %> on IP address <%= request.getLocalAddr() %>.
Give that a try and see if that's what you're looking for.
Dan