• +91 9723535972
  • info@interviewmaterial.com

Servlet Interview Questions and Answers

Question - 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. 

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners