Java – struts 2 “%” and “#” login to ognl
•
Java
Can someone tell me how to use the "%" and "#" numbers in Struts2 ognl? I'm around Google, but I can't find any valuable information about this Or give me a linked file
thank you
Solution
%Characters force ognl evaluation, so < s: property name = "% {foo}" / > will query the foo property of the stack It's not always necessary (actually few), but it's always easier to use for clarity
#Character accesses a named value stack context variable, for example, you once needed it to access a variable created with < s: set > label. You need it to access session variables, such as < s: property name = "#session. User. Name" / >
> S2 OGNL Docs > S2-specific OGNL Docs > OGNL reference docs
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
