I have this code that actually works:
To be more comfortable with Struts2 tags and OGNL language, read and bookmark this answer.
Since Struts2 tags only evaluate OGNL expressions (and not EL Expression, as you error clearly states), you need to access the JSTL object through the PageContext attribute (in OGNL #attr.something
) specified with var
:
-
${link.name}
From OGNL Basics:
#attr['foo']
or#attr.foo
: Access toPageContext
if available, otherwise searchesrequest
/session
/application
respectively