JSP 2.0 Examples - jsp:attribute and jsp:body

The new <jsp:attribute> and <jsp:body> standard actions can be used to specify the value of any standard action or custom action attribute.

This example uses the <jsp:attribute> standard action to use the output of a custom action invocation (one that simply outputs "Hello, World!") to set the value of a bean property. This would normally require an intermediary step, such as using JSTL's <c:set> action.

Bean created! Setting foo.bar...

Result: ${foo.bar}