1.

How can a servlet get information about the client machine?

Answer»

A servlet can USE getRemoteAddr() and getRemoteHost() to retrieve the IP ADDRESS and hostname of the CLIENT machine, respectively:

public String ServletRequest.getRemoteAddr()public String ServletRequest.getRemoteHost()

Both values are RETURNED as String objects. 



Discussion

No Comment Found