tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lahiru Gunathilake <>
Subject How to get Tomcat HTTP port during startup of the server
Date Thu, 06 Oct 2011 17:31:01 GMT
Hi all,

I have a requirement of getting the Tomcat HTTP port during startup of my
application. I have the ServletContext object in me during startup, before
getting any HttpRequest I need to talk tomcat HTTP port. I write a
reflection code to access that even it doesn't work always I don't know why,
sometimes those parameters are empty.

Can someone please tell me how to access the http port or else how can I
know server.xml location from servletContext so that I can directly read
from server.xml but thats not in my application classpath so I cannot load
it from the classpath files.

Appreciate your response !


System Analyst Programmer
Indiana University

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message