Example:
varAttr.tag
------------
<%@ attribute name="v" required="true" %>
<%@ variable name-from-attribute="v"
variable-class="java.lang.Long"
alias="a" scope="AT_END" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="a" value="${123}"/>
<p> TAG: ${v} = ${a} </p>
varAttr.jsp
-------------
<%@ taglib prefix="demo" tagdir="/technology/WEB-INF/tags/demo" %>
<demo:varAttr v="x"/>
<p>
JSP: x = ${x} </p>
output:
--------
TAG:x = 123
JSP:x = 123
Reference :
http://www.oracle.com/technology/pub/articles/cioroianu_tagfiles.html