but it says " Expression language not allowed in a template text body".
This is typically the case when you define a <jsp:attribute> without a <jsp:body> inside a custom tag.
However you defined the body-content as being empty so the container should allow the absence of the <jsp:body>, see this section of the specs:
JSP.5.11 <jsp:body>
Normally, the body of a standard or custom action invocation is defined implicitly as the body of the XML element used to represent the invocation. The body of a
standard or custom action can also be defined explicitly using the <jsp:body> standard action. This is required if one or more <jsp:attribute> elements appear in the
body of the tag. If one or more <jsp:attribute> elements appear in the body of a tag invocation but no <jsp:body> element appears or an empty <jsp:body> element appears, it is
the equivalent of the tag having an empty body.
You have two options now:
create an empty <jsp:body>
or
use the attribute in the way you have seen before:
Regards,
Frits