|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.interceptor.debugging.DebuggingInterceptor
public class DebuggingInterceptor
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.
Constructor Summary | |
---|---|
DebuggingInterceptor()
|
Method Summary | |
---|---|
void |
destroy()
Unused. |
void |
init()
Unused. |
java.lang.String |
intercept(com.opensymphony.xwork2.ActionInvocation inv)
|
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(java.lang.Object bean,
java.lang.String name,
PrettyPrintWriter writer,
java.util.List<java.lang.Object> stack)
Recursive function to serialize objects to XML. |
void |
setEnableXmlWithConsole(boolean enableXmlWithConsole)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DebuggingInterceptor()
Method Detail |
---|
public void init()
init
in interface com.opensymphony.xwork2.interceptor.Interceptor
public void destroy()
destroy
in interface com.opensymphony.xwork2.interceptor.Interceptor
public java.lang.String intercept(com.opensymphony.xwork2.ActionInvocation inv) throws java.lang.Exception
intercept
in interface com.opensymphony.xwork2.interceptor.Interceptor
java.lang.Exception
protected void printContext()
protected void printContext(PrettyPrintWriter writer)
writer
- The XML writerprotected void serializeIt(java.lang.Object bean, java.lang.String name, PrettyPrintWriter writer, java.util.List<java.lang.Object> stack)
bean
- The object you want serialized.name
- The name of the object, used for element <name/>writer
- The XML writerstack
- List of objects we're serializing since the first calling
of this function (to prevent looping on circular references).public void setEnableXmlWithConsole(boolean enableXmlWithConsole)
enableXmlWithConsole
- the enableXmlWithConsole to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |