Is there any way to have a custom tag that supports a variable number of unknown attributes?
Created May 4, 2012
Serge Knystautas
No, you cannot place a dynamic number of attributes in the custom tag as the JSP engine expects to validate a static number of attributes. An alternate approach to this is use a series of inner tags within your outer tag that set these dynamic settings, e.g.,
<custom:form> <custom:attr name="someUnknownAttr" value="1"> <custom:attr name="someSpecialAttr" value="2"> </custom:form>