File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSF: Tracking user views Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
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://aspose.com/file-tools
 
subject: JSF: Tracking user views
 
Similar Threads
how to view portal database?
what's the deal with pluto and liferay?
When I should Portlets?
What is portlets?
JSF Vs Struts (Portlets perspective)