This content has been marked as final.
Show 3 replies
-
1. Re: HOW-TO obtain URL for Web Application
treespace Aug 2, 2005 8:26 PM (in response to treespace)The scheme is also dynamic (ftp, https, http, file...) so obviously I will have to assume that also. That leaves the host and port number. Is there a runtime config setting for those I can get at somewhere?
-
2. Re: HOW-TO obtain URL for Web Application
treespace Aug 2, 2005 8:29 PM (in response to treespace)OK, there's jboss.bind.address so that will take care of the host name. That leaves the port number. That reduces my question to the following:
I How can I programatically retrieve the port number the web container is listening on before my first request comes in. -
3. Re: HOW-TO obtain URL for Web Application
starksm64 Aug 3, 2005 12:01 PM (in response to treespace)MBeanServer = ...; ObjectName query = new ObjectName("jboss.web:type=Connector,*"); Set matches = server.queryNames(query, null); ObjectName connector = findMatchingConnector(matches); Integer port = (Integer) server.getAttribute(connector, "port");