This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To retrieve port no and name from req obj

 
Raja Ratnam Karuppusamy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A request from client named tom with ip address:10.23.10.11 on port number 4242.From which methods on the request object would you retrieve the ip address value,the port value and the client name?
[ February 25, 2008: Message edited by: Raja Ratnam Karuppusamy ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The client name is not sent.
You should be able to find the rest by looking at this page in the API.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html

I believe getRemoteAddr is the one you're looking for.
-Ben

PS:
Please see Bear's note in your other post about using real words here.
 
Raja Ratnam Karuppusamy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic