via jsp
String hostName=request.getServerName();
int portNumber=request.getLocalPort();
via JSF
use implict object
#{header.host> //contains host:port
via EJB
ipAddress = InetAddress.getLocalHost().getHostAddress();
still don't know how to get the port of the glassfish server.
[Message sent by forum member 'dbritton60']
http://forums.java.net/jive/thread.jspa?messageID=484550