| 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.
|
 |
 |
|
|
subject: JSF: Tracking user views
|
|
|