See request.getServerPort(). Note, that if you are using mod_jk/mod_webapp behind Apache/IIS/iPlanet, that this will give you the value of the port that the webserver recieved the request on, not the port that is specified in the Connector.
"rf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > InetAddress.getLocalHost().getHostAddress()gives the > hostname, how to get the port number too? > The port is 8080 in case of tomcat, but a different > one with other app servers. What is the way to get > this number at runtime? > > Thanks > rf > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
