Viewing the contents of Session, Application and Request Bean

Go To


It would make a lot of sense to be able to monitor the contents of Session, Application and Request Bean while developing a JSF app but as far as I know, I should explicitly add watch points for the parameters I'm interested in.

Is there an easier way to see these values as I navigate through my apps the pages?

2009-06-16 14:28
by NoName


You can do it as a cross cutting concern using some Filter of your own, or some of the AOP techniques provided by the framework. The idea is to log all these information on every request. It can be console, why not.

IMO, monitoring the content of request might not be a very useful idea, though.

2009-06-17 02:39
by Adeel Ansari


If you want to see what is being added to and removed from these scopes, have a look at ServletContextAttributeListener, ServletRequestAttributeListener and HttpSessionAttributeListener. You can define instances of these classes using your web.xml.

As Vinegar says, if you want to monitor arbitrary classes, you could use AOP. You could also think about using the debugger programmatically.

2009-06-17 09:54
by McDowell