views:

187

answers:

2

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?

+1  A: 

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.

Adeel Ansari
+1  A: 

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.

McDowell