This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes getRemoteAddress Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getRemoteAddress" Watch "getRemoteAddress" New topic
Author

getRemoteAddress

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Hello
I want to get the IP of each request and be able to determine differences in the "last" octet. (either the least/most significant, xxx.xxx.xxx.???). What objects should I use? How would determine the differences? tia.
Steve McCann
Ranch Hand

Joined: Oct 20, 2004
Posts: 81
Hi Chris

You can use the ServletRequest object to get the remote IP address. Normally you would use the Http subclass of this though, HttpServletRequest. Does this help?

Steve
[ October 28, 2005: Message edited by: Steve McCann ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getRemoteAddress
 
Similar Threads
Post request doesnot support spanish characters in case of Weblogic + Solaris combination
Extends vs. Implement?
Value Object v. Transfer Object
need to create a link so a file on the network opens
should more than 1 script tags be avoided when possible and why?