| java.lang.Object org.apache.struts2.interceptor.debugging.DebuggingInterceptor
DebuggingInterceptor | public class DebuggingInterceptor implements Interceptor(Code) | |
Provides several different debugging screens to provide insight into the
data behind the page.
The value of the 'debug' request parameter determines
the screen:
-
xml - Dumps the parameters, context, session, and value
stack as an XML document.
-
console - Shows a popup 'OGNL Console' that allows the
user to test OGNL expressions against the value stack. The XML data from
the 'xml' mode is inserted at the top of the page.
-
command - Tests an OGNL expression and returns the
string result. Only used by the OGNL console.
Example:
http://localhost:8080/Welcome.action?debug=xml
This interceptor only is activated when devMode is enabled in
struts.properties. The 'debug' parameter is removed from the parameter list
before the action is executed. All operations occur before the natural
Result has a chance to execute.
|
destroy | public void destroy()(Code) | | Unused.
|
init | public void init()(Code) | | Unused.
|
printContext | protected void printContext()(Code) | | Prints the current context to the response in XML format.
|
printContext | protected void printContext(PrettyPrintWriter writer)(Code) | | Prints the current request to the existing writer.
Parameters: writer - The XML writer |
serializeIt | protected void serializeIt(Object bean, String name, PrettyPrintWriter writer, List<Object> stack)(Code) | | Recursive function to serialize objects to XML. Currently it will
serialize Collections, maps, Arrays, and JavaBeans. It maintains a stack
of objects serialized already in the current functioncall. This is used
to avoid looping (stack overflow) of circular linked objects. Struts and
XWork objects are ignored.
Parameters: bean - The object you want serialized. Parameters: name - The name of the object, used for element <name/> Parameters: writer - The XML writer Parameters: stack - List of objects we're serializing since the first callingof this function (to prevent looping on circular references). |
setEnableXmlWithConsole | public void setEnableXmlWithConsole(boolean enableXmlWithConsole)(Code) | | Parameters: enableXmlWithConsole - the enableXmlWithConsole to set |
|
|