struts2读取request,session,application中的值

  request.---->
<s:property value="#request.mySessionPropKey"/> or
<s:property value="#request['mySessionPropKey']"/> or
<s:property value="#request['myRequestPropKey']"/>
session---->
<s:property value="#session.mySessionPropKey"/> or
<s:property value="#request['mySessionPropKey']"/> or
<s:property value="#request['myRequestPropKey']"/>
application--->
<s:property value="#application.mySessionPropKey"/> or
<s:property value="#application['mySessionPropKey']"/> or
<s:property value="#application['myRequestPropKey']"/>

http://localhost:8080/demo/index.jsp?flag=kkkk
<s:property value="#parameters.flag" />
<s:property value="#parameters.mySessionPropKey"/> or
<s:property value="#parameters['mySessionPropKey']"/> or
<s:property value="#parameters['myRequestPropKey']"/>

http://struts.apache.org/release/2.3.x/docs/ognl.html

posted on 2013-07-09 11:01  游鱼  阅读(516)  评论(0编辑  收藏  举报