tags:

views:

128

answers:

3

How to track the internet usage thru java?

I want to track the site visited, how much bytes (uploaded/downloaded).

+2  A: 

You need to write a Proxy server in Java and then configure your browser to use it.

Aaron Digulla
A: 
  • The hard way: You can assign a Servlet each for upload/download page and count the bytes as they leave or get to you.
  • The easy way: Use a Proxy server to do this for you
n002213f
You can have one global Servlet, that will do this for you. It does not require a servlet for each and every page.
Chad
If this should be implemented server-side, I would use a Filter do do this. I think Chad's answer implies the use of a Filter mapped to a number of URLs as well.
Jeroen van Bergen
@Jeroen - yes that the best way, thanks
n002213f
A: 

I'm almost certain it doesn't handle bytes downloaded, I think I would suggest Google Analytics.

It's very quick to setup, but companies are often cagey about their application usage history being stored on a third party's (e.g. Google) servers.

Neil McKeown