This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See I get my machine name for getServerName(), while a totally different machine address from getRemoteHost().

Am i missing something here?
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Patel,

If the client and server are on same machine then
getServerName() returns the name(system's ip address) of your system
getRemoteHost() returns the fully qualified name(network name) of your system..

Example can be like
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!