aspose file tools
The moose likes JSF and the fly likes JSF: Tracking user views 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 » JSF
Reply Bookmark "JSF: Tracking user views" Watch "JSF: Tracking user views" New topic
Author

JSF: Tracking user views

Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
First off, let me apologize for my ignorance.

I'm working on a new project that utilizes Websphere portal, and JSF. The goal is to track user page views to a DB for later reporting purposes. I was toying with using a response filter, and trying to save the JSF view name to the DB. However, I'm unsure if this is even feasible.

For this example, you can assume a basic JSF environment minus the portal, if that makes things less complicated. If websphere portal has something that might help, I'm all ears.

And of course, any comments are appreciated. Thanks!
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Filters would be a good "JSF independant" idea.

Another recommendation would be using JSF's Phase Listeners.
When you make a request for a JSF page, certain life cycle steps are executed on server. You can configure Phase Listener to listen some or all of the phases of JSF Life cycle and track the activity.


- Varun
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Varun,

Good suggestion, but I'm having trouble finding information on JSF's Phase Listeners. Do you have a link to somewhere I might learn a bit more?

Thanks,

Michael
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Well you won't get anything more than 1 page on PhaseListener as it's n simple concept. Try out links mentioned in this page
http://www.coderanch.com/t/210534/JSF/java/Quickie-core-dump

Else,
Create this file

And put this code in your faces-config.xml


You would get everything looking at the console. All the best.
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Varun,

Sorry for the long delay in thanking you for your code sample.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JSF: Tracking user views
 
Similar Threads
When I should Portlets?
how to view portal database?
JSF Vs Struts (Portlets perspective)
what's the deal with pluto and liferay?
What is portlets?