Bookmark Topic Watch Topic
  • New Topic

request.getLocalAddr()  RSS feed

 
nancy cochran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

I have the following lines of code in a .jsp file...

request.getLocalAddr() = <%=request.getLocalAddr()%><br>
request.getLocalName() = <%=request.getLocalName()%><br>

The results I get are switched as follows:
request.getLocalAddr() = localhost
request.getLocalName() = 127.0.0.1

When I deploy to a production Websphere Application Server 6.0 I get the server host and ip address, but they are also switched.

Does anyone know what could be causing this? Possibly a DNS issue somewhere? Also, I'm posting this to the Websphere forum since I don't know if it's a websphere or jsp issue.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Also, I'm posting this to the Websphere forum since I don't know if it's a websphere or jsp issue.


Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

If you are not sure which forum to post into, pick one and if it turns out to be incorrect, get a bartender or sheriff to move it for you.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!