<%@ attribute name="attr" required="true" type="ja" /> <%@ attribute name="attr" required="true" type="ja" /> <%@ attribute name="attr" required="true" type="ja"/>

How can be a JSP ".tag" file documented?

273 Views Asked by At

There is a JSP Tag file like this:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ attribute name="attr" required="true" type="java.lang.String" rtexprvalue="true" description="FOOO" %>

<%@ attribute name="var" required="true" type="java.lang.String" rtexprvalue="false" description="BAAR" %>
<%@ variable name-from-attribute="var" variable-class="java.lang.String" alias="attrValue" scope="AT_BEGIN" %>

<c:set var="attrValue" value="${requestScope[attr]}" />

It seems to be possible to document the attributes. How to add documentation to the tag itself?

1

There are 1 best solutions below

0
Jozef Chocholacek On BEST ANSWER

The proper place to describe a tag and its properties (including attributes) is the Tag Library Descriptor. The description attribute of the attribute directive is IMHO a left-over "from the dark past" and does not have any real use nowadays.