This content has been marked as final.
Show 3 replies
-
1. Re: How can I find Tomcat Port
tomalley May 1, 2006 9:23 AM (in response to asafz)I am researching the same issue. Did you ever find answers to your questions?
-
2. Re: How can I find Tomcat Port
asafz May 2, 2006 3:24 AM (in response to asafz)
NO, I'm still dont have a clue.
if you find the answer please let me know.
thanx. -
3. Re: How can I find Tomcat Port
tomalley May 9, 2006 4:32 PM (in response to asafz)The port is found in jboss.web:type=Connector,*
There are 3 connectors defined by default so query for protocol=HTTP/1.1 and secure=false (http) or secure=true (https).MBeanServer server = MBeanServerLocator.locateJBoss(); QueryExp query = Query.and(Query.eq(Query.attr("secure"), Query.value(secure)), Query.eq(Query.attr("protocol"), Query.value(protocol))); Set ons = server.queryNames(null, query); Iterator i = ons.iterator(); ObjectName objectName = (ObjectName)i.next(); String port = objectName.getKeyProperty("port"); System.out.println("port = " + port);
I don't know if it can be modified.