[tomcat] Get the HTTP port (with a mbean ?)

S

Seb

Hello,

I need to dynamically get, in java code, HTTP port used by Tomcat.
I think I should use a "mbean", but I don't exactly know how to do.
My application run under a JBoss 3.2.2 application server.

Thanks for your help,

Sebastien
 
W

Wretched Excess

Seb said:
Hello,

I need to dynamically get, in java code, HTTP port used by Tomcat.
I think I should use a "mbean", but I don't exactly know how to do.
My application run under a JBoss 3.2.2 application server.

Thanks for your help,

Sebastien


Class HttpUtils


public static java.lang.StringBuffer getRequestURL(HttpServletRequest
req)

Reconstructs the URL the client used to make the request, using information
in the HttpServletRequest object. The returned URL contains a protocol,
server name, port number, and server path, but it does not include query
string parameters.
 
A

Andy Flowers

Seb said:
Hello,

I need to dynamically get, in java code, HTTP port used by Tomcat.
I think I should use a "mbean", but I don't exactly know how to do.
My application run under a JBoss 3.2.2 application server.

Thanks for your help,

SebastienPort

For a request you've received, take a look at HttpServletRequest.getServer();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top