This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes how to count hits Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "how to count hits " Watch "how to count hits " New topic
Author

how to count hits

Santosh Kumar
Ranch Hand

Joined: May 25, 2005
Posts: 30
hi

i am retreiving fields from the database in a loop as links
i need to count the number of views for each link
i need to coutn the number of hits for each link

how can i do that using jsp or java
please help me solve the problem


waiting for your reply

regads
santosh
Baiju Varugese
Ranch Hand

Joined: Dec 16, 2003
Posts: 74
1.instead of directly providing the link to the user, give the user link to the common servlet and the link as parameter with some id, so when a request for that id comes increment the counter's and forward the request to the url

2. use filter for all the request, and do the counter in the filter, use id for the each url


Measure twice cut once carpenter theory <br /> <br />Baiju <br />SCJCP, SCBCD, IBM-486, IBM-484, SCEA Part I
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to count hits
 
Similar Threads
Servlet Hits
Disabling the links in a document on holding the Shift Key
Servlet count
how to count number of visitors
i want count the no of hits for each client....