struts2值栈ValueStack中都有哪些东西?

时间:2014-05-12 22:24:59   收藏:0   阅读:325

com.opensymphony.xwork2.dispatcher.HttpServletRequest

application

com.opensymphony.xwork2.dispatcher.HttpServletResponse

com.opensymphony.xwork2.ActionContext.name

com.opensymphony.xwork2.ActionContext.application

attr

com.opensymphony.xwork2.ActionContext.container

com.opensymphony.xwork2.ActionContext.session

com.opensymphony.xwork2.ActionContext.actionInvocation

session

request

action

struts.actionMapping

parameters

com.opensymphony.xwork2.ActionContext.parameters

上面列出来的就是键名(key)了,具体是什么查百度了,可以通过ValueStack.getContext().get(key)得到相关的对象。

拦截器中

com.opensymphony.xwork2.interceptor.Interceptor的intercept中通过arg0.getInvocationContext().getValueStack()可以得到值栈。

 action中,还记得(RequestAware,SessionAware,ApplicationAware)不

实现RequestAware接口,在得到的map中arg0.get("struts.valueStack");可得

 

 

struts2值栈ValueStack中都有哪些东西?,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!