This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes How to get Tomcat Port in servlet's init method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to get Tomcat Port in servlet Watch "How to get Tomcat Port in servlet New topic
Author

How to get Tomcat Port in servlet's init method

Deepak KumarMishra
Greenhorn

Joined: Oct 25, 2008
Posts: 1
Hi Friends,
I need to get the tomcat's port number in a servlet's init method.

I understand that I can use HttpeServletRequest.getServerPort() to get the port, but for this, I need to have the request; but I need the Port number in servlet's init method.

Can you please suggest a way to find that out?

Thank you,
Deepak
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hope This Helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get Tomcat Port in servlet's init method
 
Similar Threads
Error not recognize
init of servlets and jsp
Struts Design Question?
i want to block a user after three successive wrong password entry
interview questions - J2EE