This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is there any request info that's present on link click, but not direct access?

 
Bill Brasskey
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm attempting to track clicks on our site's links...
Is there any piece of info that would be present on a request to a page if the user clicked on a link on our site, and not be present if the user simply typed in the address in the browser??
(no data is appended to the url)
Any advice greatly appreciated...
 
Dmitry Melnik
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a request header named "Referer" which you might find useful. It contains the URL of the referer page.

On your request object (of type HttpServletRequest) call getHeader("REFERER"), and check if the string it returns gives you what you need.
 
Bill Brasskey
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that will work!

Thanks a lot, Dmitry
[ July 16, 2004: Message edited by: Bill Brasskey ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic