2013年10月7日 星期一

struts2 OGNL value Get Method

1. Problem:
there are some difference method to get struts2 value such as $, #,
but what is the difference between them??


2. Solution:
  • objectName: object in the ValueStack (default/root object in the OGNL context), such as an Action property
  • #objectName: object in the ActionContext but outside of the ValueStack, specifically...
  • %{ OGNL expression } is used to force OGNL evaluation of an attribute that would normally be interpreted as a String literal.

Reference:
whats-the-difference-between-and-signs-in-struts-tags

沒有留言:

張貼留言