Originariamente inviato da Mistral82
nometag.tag
codice:
<%@ tag body-content="empty" %>
   <%-- empty non permette di usare un body quando viene richiamato il tag --%>

<%@ attribute name="nomeattributo" rtexprvalue="true" required="true" %>
   <%-- eventuali attributi per il tag --%>

        CODICE JAVA
Sì, qui dentro (nel .tag) puoi usare scriptlet <% ... %> e <%= ... %> che contiene codice Java.

Il custom tag indicato sopra ha body "empty" (vuoto) ma se così non fosse è allora lì, nella invocazione del tag, che non puoi usare scriptlet all'interno del body.