Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invisible Website Hit Counter

 
vinay abhishek
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am want to code a Database Driven Web Application where a user can monitor the hit count of his webpages.
The application should be developed in such a way that the website and the associated hit-count have to be stored in the database and the hit count has to be updated in the database after each new visit.
I need help in knowing the logic of how to count the hit rate, Ingesting the count associated with each website in the database and retrieving it the GUI.
I plan to use Java Server Faces to design the GUI and Java Persistence Query Language to develop the application .
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a lot to ask.

For the "counting", you can simply use Filters or Interceptors.

As for the presentation, that's another huge area, and is up to you to pick what GUI MVC framework you need.

WP
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I advise to take a step back and ask: what would this project do that Google Analytics doesn't do, a whole lot better, for free? (Yes, there are answers to this -quite valid ones, too- but unless you come up with those on your own, I'd advise to go with GA instead.)
 
vinay abhishek
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well Sir,
Then I looked up for some thing like this...
A jsp which increments an integer by one each time a page is loaded.
and displays the integer on the GUI.

But now I would like to improve the functionality of this by backing it up with a database and updating a record "count" every time the page is visited. What would be the possible approach??
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless the whole purpose of this project is to learn some basic JSP concepts, I still think you should be asking yourself the question I posed.
 
vinay abhishek
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you just said this project is to an attempt to build a strong JSP foundation in me. After knowing about google analytics I understand that there is no big necessity to develop such an application but its for my understanding of how things work in jsp I am trying to develop this application as a part of my course work at school.
I have been working on this for the past 15 days. I could develop username and password based authentication for the user, Registration for any new users.... and now I am having problems( I have no Idea) pertaining to adding the hit count of a particular site to the DB, updating it, and Retrieving back on to the UI.
I can understand that this answer is very abstract and ambiguous. I will take some time to make an attempt to code and get back. Thanks for the support.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17621
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't learn strong "JSP concepts" working with JSF. JSF does not employ JSPs.

Beyond that (and related to it) is the fact that JSF is heavily dependent on the concept of postbacks, where the same page may be displayed multiple times for a single use.

So employing traditional JSP page count techniques to JSF View Templates will radically distort your statistics.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic