org.apache.struts2.interceptor.debugging
类 DebuggingInterceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
org.apache.struts2.interceptor.debugging.DebuggingInterceptor
- 所有已实现的接口:
- com.opensymphony.xwork2.interceptor.Interceptor, Serializable
public class DebuggingInterceptor
- extends com.opensymphony.xwork2.interceptor.AbstractInterceptor
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.
browser
Shows field values of an object specified in the
object parameter (#context by default). When the object
parameters is set, the '#' character needs to be escaped to '%23'. Like
debug=browser&object=%23parameters
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.
- 另请参见:
- 序列化表格
从类 com.opensymphony.xwork2.interceptor.AbstractInterceptor 继承的方法 |
destroy, init |
DebuggingInterceptor
public DebuggingInterceptor()
setDevMode
public void setDevMode(String mode)
setFreemarkerManager
public void setFreemarkerManager(FreemarkerManager mgr)
setReflectionProvider
public void setReflectionProvider(com.opensymphony.xwork2.util.reflection.ReflectionProvider reflectionProvider)
intercept
public String intercept(com.opensymphony.xwork2.ActionInvocation inv)
throws Exception
- 指定者:
- 接口
com.opensymphony.xwork2.interceptor.Interceptor
中的 intercept
- 指定者:
- 类
com.opensymphony.xwork2.interceptor.AbstractInterceptor
中的 intercept
- 抛出:
Exception
setEnableXmlWithConsole
public void setEnableXmlWithConsole(boolean enableXmlWithConsole)
- 参数:
enableXmlWithConsole
- the enableXmlWithConsole to set