Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 55401 invoked from network); 1 Apr 2006 22:19:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Apr 2006 22:19:45 -0000 Received: (qmail 98453 invoked by uid 500); 1 Apr 2006 22:19:38 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 98411 invoked by uid 500); 1 Apr 2006 22:19:38 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 98400 invoked by uid 99); 1 Apr 2006 22:19:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Apr 2006 14:19:38 -0800 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS,FORGED_YAHOO_RCVD X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.200.151] (HELO web30808.mail.mud.yahoo.com) (68.142.200.151) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 01 Apr 2006 14:19:37 -0800 Received: (qmail 34705 invoked by uid 60001); 1 Apr 2006 22:19:16 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=qOqW/+g5hYRgqWeSHBf6SDMInPI82SHXvL6OCV3xJ1CW3aELlfIEMPjsLnio8qso3tDiAPqT7AXeiqQGUB3Iovr9vixZ54b7d5l0/3Wluhw2J2Z95xdP4mf1P1BtLAR6Vm4J+C3q9HR3EpIxgDGD+ISIa48LxtDAMY+ZtLqfMmQ= ; Message-ID: <20060401221916.34703.qmail@web30808.mail.mud.yahoo.com> Date: Sat, 1 Apr 2006 14:19:16 -0800 (PST) From: Gabe Reply-To: Gabe Subject: Re: [action2] Debugging interceptor for devMode To: Struts Developers List In-Reply-To: <442DEA41.301@twdata.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Don, 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). Gabe ----- 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] http://issues.apache.org/struts/browse/WW-1279 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org