wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes need a tool for viewing context objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "need a tool for viewing context objects" Watch "need a tool for viewing context objects" New topic
Author

need a tool for viewing context objects

J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 874
    
  13

Is there a tool that will let me see the values stored in objects in context? Psi-Probe will let me see the class of the objects, but not the properties, or at least I can't figure out how.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

What's a "context"?
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 874
    
  13

Sorry, too cryptic. I mean ServletContext. I'd like to be able to view the beans/maps/whatever that I've put there as attributes and see if they hold the data that I expect them to hold.

i.e, I have a weather forecast object that is updated twice an hour by a ServletContextListener. It would be helpful for troubleshooting if I could view that object and see it's properties.

It's not a show stopper, just something that occurred to me as "nice to have" thing. I can always use logging to track it's updates.

Psi-Probe will show me that the object is there, but I can't view the properties of it.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15964
    
  19

If you're referring to objects stored in Application Scope, probably the easiest thing to do is just write a little servlet or JSP that gets the context attributes and enumerates them. Although I recommend keeping that code secure so that not just anyone can exploit it.

For more general things like startup configuration info (which, of course shouldn't change), you should look at the MBean interface for your appserver (if there is one). Or the appserver may provide a management console app that can be used, depending on which appserver it is.


Customer surveys are for companies who didn't pay proper attention to begin with.
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 874
    
  13

Tim Holloway wrote:If you're referring to objects stored in Application Scope, probably the easiest thing to do is just write a little servlet or JSP that gets the context attributes and enumerates them.


That's a clever solution. I wish I had thought of that. Thanks.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need a tool for viewing context objects
 
Similar Threads
Data Modeling Tool For Directory Services
Free SCBCD Exam Simulators
yet another 404 status code message
Accessing weblogic ejb from jboss
XmlRpcClientException