struts2标签获取parameter,request,session,application中的值

request.----> 

<s:property value="#request.mySessionPropKey"/> or  

<s:property value="#request['mySessionPropKey']"/> or  

<s:property value="#request['myRequestPropKey']"/> or

${requestScope.buttonRoleMap}  or

${request.buttonRoleMap}  or

${buttonRoleMap} 

session----> 

<s:property value="#session.mySessionPropKey"/> or  

<s:property value="#session['mySessionPropKey']"/> or  

<s:property value="#session['myRequestPropKey']"/> or

${session.buttonRoleMap}



application---> 

<s:property value="#application.mySessionPropKey"/> or  

<s:property value="#application['mySessionPropKey']"/> or  

<s:property value="#application['myRequestPropKey']"/> or

${application.buttonRoleMap}



本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/coffeeing/archive/2010/05/24/5620367.aspx
ognl参考例子:http://struts.apache.org/2.1.6/docs/ognl.html

猜你喜欢

转载自yan578351314.iteye.com/blog/1058350