Link to home
Start Free TrialLog in
Avatar of NParamas
NParamas

asked on

How do i get URL of the page from where a request is coming- using java

Hi

I have an ads landing page. The link for the landing page will be available as hyperlink in different websites like: www.google.com, www.irctc.co.in, www.ads.com. I have to identify from which website the request is coming from? Based on the Domain name i will have to assign some points:

for example, If someone searches for myads, then my URL will be displayed in Google search results page.

My servlet has to identify that the request is coming from Google site.

I have used request.getXXX method. but i could not get the domain. I am not sure which method of request will provide suitable solution for my requirement?

Thanks
NParamas
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
request.getRequestUri
request.getRequestUrl