• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LocalHost in request.serverName()

 
Nitin Raodeo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have my Web application on Tomcat server(without Apache).
The IP is mapped to some DSN.
In my JSP when i fetch the name of the server(request.serverName() )
it is displayed it as LocalHost and not the server name.
Does any configuration need to be done?
Thanks in Advance.
 
Ken Robinson
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe this is web container specific. Each web container usually has it's own config file (catalina.xml I believe for Tomcat) that allows configuration of vendor specific properties. Most likely, localhost is configured in this file as the server name. Try playing with it and switching to the IP of the machine instead.
I'm not sure this will work, but I've had a similar problem with the host URL/name in the container I'm using and it was a vendor specific issue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic