Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleExpose OGNL 'jobs' value to JSP/JSTL scope 'jobz'
<s:set name="jobz" value="jobs" scope="request" />
<c:forEach items="${jobz} var="job">
...
</c:forEach>
Info
title"Auto-exposure"

OGNL values are automagically exposed to JSP/JSTL; using <s:set.../> as described above may not be necessary.

A full example below shows a struts variable "jobs" being exposed as "jobz" and being used with jstl and the display tag.

...