• Post Reply Bookmark Topic Watch Topic
  • New Topic

finding the servlet's base host

 
chris p
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so imagine i want a servlet to display the ip or hostname of the server on which it's running. How would i go about doing that?
thanks in advance.
-chris
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.net.InetAddress.getLocalHost().toString();
 
chris p
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
danke
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!