IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New 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
New Thanks man, appreciate it.
bcnu,
Mikem

Eine Leute. Eine Welt. Ein F\ufffdhrer.
(Just trying to be accepted in the New America)
     JSP question. - (mmoffitt) - (2)
         Re: JSP question. - (dshellman) - (1)
             Thanks man, appreciate it. -NT - (mmoffitt)

(This message was left blank.)
59 ms