users@glassfish.java.net

Re: EJB determine hostname/port of glassfish server

From: <glassfish_at_javadesktop.org>
Date: Thu, 07 Oct 2010 07:32:26 PDT

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