Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to count no of hits from a particular client?

 
Akilan Paul
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1721
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ranch Hands!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic