struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabe <>
Subject Re: [action2] Debugging interceptor for devMode
Date Sat, 01 Apr 2006 22:19:16 GMT


Sounds interesting but I wonder if it can be expanded to be made more flexible:
1) Create an XML result type (is there one already?) and a global result of that type that
is the result that the interceptor forwards to if "debug=true". This XML result type could
(eventually or now) then be used to print XML for a variety of uses (perhaps, such as creating
DWR like javascript objects for AJAX calls or outputting SOAP responses).
2) have an optional parameter to this interceptor that allows you to change the global result.
Thus, you could write your own result that dealt with the debug differently than xml.
3) I wouldn't use the parameter name 'debug' because it is generic and might be used by applications
for other things. We wouldn't want developers to have a debug=true parameter used for other
reasons and then suddenly everything is printed out as XML (maybe printForDebug=true instead?)

As an aside, another thing to consider is whether the interceptor should be part of Struts
or XWork. Since the interceptor itself doesn't really have a web specific scope, I would say
that it really belongs as a contribution to XWork. (Or at least this is the way the relationship
btw XWork and Webwork used to work). 


----- Original Message ----
From: Don Brown <>
To: Struts Developers List <>
Sent: Friday, March 31, 2006 9:49:37 PM
Subject: [action2] Debugging interceptor for devMode

Sorry, forgot the [action2] tag...

Don Brown wrote:
> I've created an interceptor that I've found invaluable for debugging. 
> When you append "debug=true" to the query string, this interceptor 
> hijacks the normal result and instead, dumps the parameters, context, 
> session, and value stack to the response as XML. Since most browsers 
> know how to handle XML, this is a great tool for getting a view at the 
> data behind the page. The interceptor only works when devMode is set to 
> true.
> I'm putting this in as a ticket[1], because I'd like some feedback 
> first. It is my intention to put this interceptor into the default 
> stack. Since it only engages when devMode is enabled, it should be safe 
> and have little effect on production applications.
> Don
> [1]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message