Difference between
version 10
and
version 7:
At line 15 changed 1 line. |
By default, it exposes the values from the Contants class imported into the tag library, but also allows a className variable to specify a different class. The main reason I wrote this was to prove it was possible. The second reason was to get around importing Constants and then using |
By default, it exposes the values from the Contants class imported into the tag library, but also allows a className variable to specify a different class. The main reason I wrote this was to prove it was possible. The second reason was to get around importing my Contants class (and using <%=Contants.VARNAME%>). With this tag, both of the following work: |
At line 17 changed 1 line. |
{{{<%=Constants.VARNAME%>}}} |
{{{Scriptlet: <%=VARNAME%>, JSTL: <c:out value="${VARNAME}"/>}}} |
At line 23 changed 1 line. |
|
!Files Needed for Tag Library |
* [1] ConstantsTag.java |
* [2] ConstantsTei.java - exposes variables as attributes |
---- |
!!ConstantsTag.java [#1] |
At line 181 added 2 lines. |
---- |
!!ConstantsTei.java [#2] |
At line 257 added 2 lines. |
|
Also see [my blog post|http://www.raibledesigns.com/page/rd?anchor=useless_tag_library]. |
Back to ConstantsTag,
or to the Page History.
|