aspose file tools*
The moose likes JSP and the fly likes is there any request info that's present on link click, but not direct access? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "is there any request info that Watch "is there any request info that New topic
Author

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

Bill Brasskey
Ranch Hand

Joined: Jun 01, 2004
Posts: 47
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

Joined: Dec 18, 2003
Posts: 328
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

Joined: Jun 01, 2004
Posts: 47
I think that will work!

Thanks a lot, Dmitry
[ July 16, 2004: Message edited by: Bill Brasskey ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is there any request info that's present on link click, but not direct access?