Struts Debug标签可以在视图的当前位置打印出ValueStack及Stack Context的详细信息。在使用前,我们需要修改struts配置文件把struts.devMode设置成true。
<constant name="struts.devMode" value="true" />
com.yte.daxie.action.TestAction | container | There is no read method for container | class java.lang.String |
---|---|---|---|
actionErrors | [] | class java.util.LinkedList | |
actionMessages | [] | class java.util.LinkedList | |
fieldErrors | {} | class java.util.LinkedHashMap | |
texts | null | null | |
locale | zh_CN | class java.util.Locale | |
com.yte.daxie.action.TestAction | theTime | Sun Nov 01 12:30:48 CST 2020 | class java.util.Date |
com.opensymphony.xwork2.DefaultTextProvider | localizedTextProvider | There is no read method for localizedTextProvider | class java.lang.String |
texts | null | null |
以下列表中的内容都可以用%{#key}这样的语法引用到 | |
---|---|
Key | Value |
tt | 2020-11-1 12:30:48 (class java.lang.String) |
com.opensymphony.xwork2.ActionContext.locale | zh_CN (class java.util.Locale) |
request | {struts.actionMapping=ActionMapping{name='test', namespace='/', method='null', extension='null', params={}, result=null}…… |
struts.actionMapping | ActionMapping{name='test', namespace='/', method='null', extension='null', params={}, result=null} (class org.apache.struts2.dispatcher.mapper.ActionMapping) |
__component_stack | [org.apache.struts2.components.Debug@2af10e18] (class java.util.Stack) |
session | {} (class org.apache.struts2.dispatcher.SessionMap) |
xwork.NullHandler.createNullObjects | false (class java.lang.Boolean) |
com.opensymphony.xwork2.dispatcher.PageContext | org.apache.jasper.runtime.PageContextImpl@32872364 (class org.apache.jasper.runtime.PageContextImpl) |
com.opensymphony.xwork2.dispatcher.HttpServletRequest | org.apache.struts2.dispatcher.StrutsRequestWrapper@4bca7ea7 (class org.apache.struts2.dispatcher.StrutsRequestWrapper) |
com.opensymphony.xwork2.ActionContext.container | com.opensymphony.xwork2.inject.ContainerImpl@20d18c62 (class com.opensymphony.xwork2.inject.ContainerImpl) |
last.property.accessed | null |
com.opensymphony.xwork2.ActionContext.application | …… |
xwork.MethodAccessor.denyMethodExecution | false (class java.lang.Boolean) |
__requestWrapper.getAttribute | false (class java.lang.Boolean) |
action | com.yte.daxie.action.TestAction@712d79a (class com.yte.daxie.action.TestAction) |
report.conversion.errors | false (class java.lang.Boolean) |
com.opensymphony.xwork2.ActionContext.name | test (class java.lang.String) |
attr | AttributeMap {request={struts.actionMapping=ActionMapping{name='test', namespace='/', method='null', extension='null', params={}, result=null}…… |
current.property.path | null |
com.opensymphony.xwork2.ActionContext.actionInvocation | com.opensymphony.xwork2.DefaultActionInvocation@7bb360fc (class com.opensymphony.xwork2.DefaultActionInvocation) |
com.opensymphony.xwork2.util.ValueStack.ValueStack | com.opensymphony.xwork2.ognl.OgnlValueStack@5b755ffa (class com.opensymphony.xwork2.ognl.OgnlValueStack) |
com.opensymphony.xwork2.dispatcher.HttpServletResponse | org.apache.catalina.connector.ResponseFacade@605f64f4 (class org.apache.catalina.connector.ResponseFacade) |
com.opensymphony.xwork2.util.LocalizedTextProvider.reloaded | true (class java.lang.Boolean) |
com.opensymphony.xwork2.ActionContext.parameters | {} (class org.apache.struts2.dispatcher.HttpParameters) |
com.opensymphony.xwork2.dispatcher.ServletContext | org.apache.catalina.core.ApplicationContextFacade@4fa82bf6 (class org.apache.catalina.core.ApplicationContextFacade) |
last.bean.accessed | null |
com.opensymphony.xwork2.ActionContext.session | {} (class org.apache.struts2.dispatcher.SessionMap) |
application | …… |
com.opensymphony.xwork2.ActionContext.conversionErrors | {} (class java.util.HashMap) |
parameters | {} (class org.apache.struts2.dispatcher.HttpParameters) |
版权声明:本文为20NN作者「sophia」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:http://www.20nn.cn/struts/struts-debug.html
不良信息举报电话:029-85678878,商务合作短信留言:18291486809,邮箱:yte1@qq.com
『野天鹅』以分享生活智慧为中心,内容包括社保、档案、户籍、学业、商业、理财等,我们希望我们精心编排的内容能为您的日常生活提供真正有效的帮助。
『西安野天鹅网络技术有限公司』