This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Question about obtaining IP of tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question about obtaining IP of tomcat" Watch "Question about obtaining IP of tomcat" New topic
Author

Question about obtaining IP of tomcat

Benny Tang
Greenhorn

Joined: Aug 03, 2003
Posts: 26
Hi All,
Since I want to find out the IP of the machine which is running tomcat, I know that it can be obtained by using the class InetAddress. But is there any other ways that can obtain the same information like using class ServletContext, HttpServletRequest.....
Thanks for your kind attention.
Benny
ib idris
Greenhorn

Joined: Aug 02, 2003
Posts: 29
request.getServerName()
gives you the name of the host or ip address.
http://galileo.spaceports.com/~ibidris/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about obtaining IP of tomcat
 
Similar Threads
how to get IP address in linux
why localhost:8080 doesn't work?
From which IP application deployed
Abybody try install Tomcat and IIS in same machine?
Unable to access tomcat via public ip