• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need suggestions to count no of hits for Download link  RSS feed

 
satya srinivas volla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have an Download link in a jsp. My requirement is whenever user clicks on download link, before providing the download data,i have to track the no of hits.
We are having a 3rd party page tracking, which returns a 1*1 pixel image after tracking is done.

what i am doing is, i am forwarding the user to some redirection.jsp .
In that redirection.jsp, i am calling the 1*1 pixel image tag(3rd party page tracking by loading an image), after that i am redirecting the user to actual download link.
But what happening now is, request is redirecting before the 3rd party page tracking image is loaded.

Download Page (download.jsp)

Download Now


redirection.jsp

<image src="thirdpartyurl?parameters=xx" width="1" height="1" border="0" alt=""></image>
<%response.sendRedirect("actual download link");%>

Now I am thinking about getting the image loading status 200 or OK and after that i want to redirect the user to original download link.
If it is possibel how can i do it or any other suggestions without cookies concept.

After loading the page tracking image only, i have to redirect the user to original link.
 
swapnl patil
Ranch Hand
Posts: 80
posted 7 years ago
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use filters & keep track of count .
In filter set the count in context attribute so that you can that count from any page or servlet in application.

let me know if you have any quires.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!