1. The ognl expression depends on the struts2 tag and must be used with the struts2 tag,
% "Is used to calculate the value of the ognl expression when the flag property is of the string type.
<S: a href = "getthememsg. Action? Tea_id = % {# session. loginuser. Teacher. tea_id} "cssclass =" icozwsc "> composition upload </s: A>
Access session contains loginuser attributes
<S: property value = "# session. loginuser. Teacher. tea_name"/>
2. El provides the ability to use runtime expressions outside the scope of JSP scripting elements.
El access variable data
1 $ (document). Ready (2 3 function () {4 5 6 // display the prompt Message 7 var M = "$ {MSG}"; 8 If (! Checkisnull (M) 9 alert (m); 10 11 // display level icon 12 var rankscore = "<% = score %>" 13 // alert (rankscore ); 14 setrankpic (rankscore); 15} 16 );View code
3. ognl <s: Property (changed to # priviewlist, so there is no value .)
Private Map <integer, list <turnpictemp> priviewlist;
"alt =" delicious joy "class =" absimg "style =" Top: 77px; left: 0px "/>
Private Map <integer, list <string> priviewlist;
References: El and ognl expressions are used differently.
Ognl expression of struts 2 (# % $)
El expression value from array map list set
S: propertyd usage
El, ognl expression $ % #