Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » interceptor » debugging » [javadoc | source]
org.apache.struts2.interceptor.debugging
public class: DebuggingInterceptor [javadoc | source]
java.lang.Object
   org.apache.struts2.interceptor.debugging.DebuggingInterceptor

All Implemented Interfaces:
    com.opensymphony.xwork2.interceptor.Interceptor

Provides several different debugging screens to provide insight into the data behind the page. The value of the 'debug' request parameter determines the screen:

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.
Method from org.apache.struts2.interceptor.debugging.DebuggingInterceptor Summary:
destroy,   init,   intercept,   printContext,   printContext,   serializeIt,   setDevMode,   setEnableXmlWithConsole,   setFreemarkerManager,   setReflectionProvider
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.interceptor.debugging.DebuggingInterceptor Detail:
 public  void destroy() 
    Unused.
 public  void init() 
    Unused.
 public String intercept(ActionInvocation inv) throws Exception 
 protected  void printContext() 
    Prints the current context to the response in XML format.
 protected  void printContext(PrettyPrintWriter writer) 
    Prints the current request to the existing writer.
 protected  void serializeIt(Object bean,
    String name,
    PrettyPrintWriter writer,
    List<Object> stack) 
    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.
 public  void setDevMode(String mode) 
 public  void setEnableXmlWithConsole(boolean enableXmlWithConsole) 
 public  void setFreemarkerManager(FreemarkerManager mgr) 
 public  void setReflectionProvider(ReflectionProvider reflectionProvider)