Is it possible to create a page scope variable in a jsp 2.0 tag accessible to the parent page?
1 answer
so yes it is possible;)
<%@ attribute name="var" required="true" rtexprvalue="false" %>
<%@ variable name-from-attribute="var" alias="mirror" scope="AT_END" %>
<c:set var="mirror" value="works"/>
but this attribute cannot be optional: (if you want to do some kind of conditional assignment (for example: if var exists - assign something to it, if not - show something) this is not possible
more details: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html#wp89909
+2
voo
source
to share