• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

LocalHost in request.serverName()

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic