aspose file tools*
The moose likes JSP and the fly likes how to count no of hits from a particular client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to count no of hits from a particular client?" Watch "how to count no of hits from a particular client?" New topic
Author

how to count no of hits from a particular client?

Akilan Paul
Ranch Hand

Joined: May 22, 2006
Posts: 40
i am developing one web application, here one sever and three clients, my project guide told me to count no hits from a client on that day.
how can i achive that?
jsp.html and tomcat server 5.0 thes thinks i am using
\
[ January 30, 2007: Message edited by: Paul ]

Regards,
Aki
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

"Paul",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

Moreover, "pls help me" is a poor choice as a topic title. Pleae use a descriptive title.

Read this for mroe info.
Akilan Paul
Ranch Hand

Joined: May 22, 2006
Posts: 40
Originally posted by Paul:
i am developing one web application, here one sever and three clients, my project guide told me to count no hits from a client on that day.
how can i achive that?
jsp.html and tomcat server 5.0 thes thinks i am using
\

[ January 30, 2007: Message edited by: Paul ]


ok thanks for your advice
i changed what you suggest!
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
hey anil, could you use JSP or some kind of scripting because using only HTML you cannot do the math, that is increment the count. You need some kind of mechnism to increment the counter and at the same time hold the previous value of the count.
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
Well at what level do you need to track?
Just how many hits on the site, or do you need a page breakdown/analysis as well?

You need to be able to distinguish between the clients.
If they have to log in to your application, you're sorted - you can track it via login name.
A stored cookie could also identify a client (as long as the user doesn't mind cookies)
If not, you might have to resort to something like IP address - request.getRemoteHost()?


Probably the best way to track this is via a ServletFilter that would execute on every request, and track who requested what.

http://java.sun.com/products/servlet/Filters.html
Akilan Paul
Ranch Hand

Joined: May 22, 2006
Posts: 40
Thanks Ranch Hands!!!
 
 
subject: how to count no of hits from a particular client?