This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client Information

 
Supraja Kannaiyan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HttpServletRequest object has a method for getting the client's IP address (getRemoteAddress or something like that); is that sufficient?
 
Supraja Kannaiyan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No That is not sufficient. I need the website address actually.

Thanks for your reply.

Supraja
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic