aspose file tools*
The moose likes Servlets and the fly likes Client Information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Client Information" Watch "Client Information" New topic
Author

Client Information

Supraja Kannaiyan
Ranch Hand

Joined: Mar 09, 2007
Posts: 41
Hi,

I have a requirement in which i have to determine the request made by client is from specific site only.

Please help me..

Thanks,
Supraja
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
The HttpServletRequest object has a method for getting the client's IP address (getRemoteAddress or something like that); is that sufficient?


Ping & DNS - my free Android networking tools app
Supraja Kannaiyan
Ranch Hand

Joined: Mar 09, 2007
Posts: 41
No That is not sufficient. I need the website address actually.

Thanks for your reply.

Supraja
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
What do you mean by "website address"? An HTTP request does not originate from a web site, it originates from a machine that has a specific IP address, and which in all likelihood does not host a web site.

Are you saying (for example) that only employees of a specific company should access your web site? If so, the admin of that company can give you the range of IP addresses from which the employees might be accessing your server. Of course, then they can't use the site if they're at home or on the road.

Maybe user authentication is the way to go.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client Information