20NN课程网
扫一扫,放到手机桌面

struts中文手册

Struts debug标签

Struts Debug标签可以在视图的当前位置打印出ValueStack及Stack Context的详细信息。在使用前,我们需要修改struts配置文件把struts.devMode设置成true。

<constant name="struts.devMode" value="true" />

Struts Debug标签打印内容示例

Value Stack部分

com.yte.daxie.action.TestActioncontainerThere is no read method for containerclass java.lang.String
actionErrors[]class java.util.LinkedList
actionMessages[]class java.util.LinkedList
fieldErrors{}class java.util.LinkedHashMap
textsnullnull
localezh_CNclass java.util.Locale
com.yte.daxie.action.TestActiontheTimeSun Nov 01 12:30:48 CST 2020class java.util.Date
com.opensymphony.xwork2.DefaultTextProviderlocalizedTextProviderThere is no read method for localizedTextProviderclass java.lang.String
textsnullnull

Stack Context部分

以下列表中的内容都可以用%{#key}这样的语法引用到
KeyValue
tt2020-11-1 12:30:48 (class java.lang.String)
com.opensymphony.xwork2.ActionContext.localezh_CN (class java.util.Locale)
request{struts.actionMapping=ActionMapping{name='test', namespace='/', method='null', extension='null', params={}, result=null}……
struts.actionMappingActionMapping{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.createNullObjectsfalse (class java.lang.Boolean)
com.opensymphony.xwork2.dispatcher.PageContextorg.apache.jasper.runtime.PageContextImpl@32872364 (class org.apache.jasper.runtime.PageContextImpl)
com.opensymphony.xwork2.dispatcher.HttpServletRequestorg.apache.struts2.dispatcher.StrutsRequestWrapper@4bca7ea7 (class org.apache.struts2.dispatcher.StrutsRequestWrapper)
com.opensymphony.xwork2.ActionContext.containercom.opensymphony.xwork2.inject.ContainerImpl@20d18c62 (class com.opensymphony.xwork2.inject.ContainerImpl)
last.property.accessednull
com.opensymphony.xwork2.ActionContext.application……
xwork.MethodAccessor.denyMethodExecutionfalse (class java.lang.Boolean)
__requestWrapper.getAttributefalse (class java.lang.Boolean)
actioncom.yte.daxie.action.TestAction@712d79a (class com.yte.daxie.action.TestAction)
report.conversion.errorsfalse (class java.lang.Boolean)
com.opensymphony.xwork2.ActionContext.nametest (class java.lang.String)
attrAttributeMap {request={struts.actionMapping=ActionMapping{name='test', namespace='/', method='null', extension='null', params={}, result=null}……
current.property.pathnull
com.opensymphony.xwork2.ActionContext.actionInvocationcom.opensymphony.xwork2.DefaultActionInvocation@7bb360fc (class com.opensymphony.xwork2.DefaultActionInvocation)
com.opensymphony.xwork2.util.ValueStack.ValueStackcom.opensymphony.xwork2.ognl.OgnlValueStack@5b755ffa (class com.opensymphony.xwork2.ognl.OgnlValueStack)
com.opensymphony.xwork2.dispatcher.HttpServletResponseorg.apache.catalina.connector.ResponseFacade@605f64f4 (class org.apache.catalina.connector.ResponseFacade)
com.opensymphony.xwork2.util.LocalizedTextProvider.reloadedtrue (class java.lang.Boolean)
com.opensymphony.xwork2.ActionContext.parameters{} (class org.apache.struts2.dispatcher.HttpParameters)
com.opensymphony.xwork2.dispatcher.ServletContextorg.apache.catalina.core.ApplicationContextFacade@4fa82bf6 (class org.apache.catalina.core.ApplicationContextFacade)
last.bean.accessednull
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)
写一些自己的看法

网站优选

备案:陕ICP备17014144号-5

不良信息举报电话:029-85678878,商务合作短信留言:18291486809,邮箱:yte1@qq.com

『野天鹅』以分享生活智慧为中心,内容包括社保、档案、户籍、学业、商业、理财等,我们希望我们精心编排的内容能为您的日常生活提供真正有效的帮助。

『西安野天鹅网络技术有限公司』