1.OGNL expression
OGNL usage
<% @ Taglib uri = "/ struts-tags" prefix = "s"%> Import tab
OGNL special characters #% $
# Usage: # may be used to obtain the value of the object field, it can also be used to define a map
% Usage: forced resolves to OGNL expression (or forced not resolving OGNL expression), the label can only be used in OGNL
$ Usage:
2. The value of the stack
When an action is created from time to time, and it will create a serve of ValueStack
The value of the internal structure of the stack
root area --CompoundRoot ---- in fact, an ArrayList
put some objects
--OgnlContext ---- regional context is actually a Map
to put some common web development application objects, such as request, session, application
Get the value stack objects
Two ways
Stack operation target value - the value of the data stored in the root stack
1. provided in the action attribute get method can be stored, as they can, through page <s: property value = "user.username " /> obtain a user name
2. push or set the data into the stack, the method generates a set map object, and places it in the stack