taglib.jsp.

Enterprise Java
Tag Libraries: JSPs in the Enterprise
by Dion Almaer
Listing 8. taglib.jsp.


<%@ taglib uri="/fib.tld" prefix="fib" %>

<html>
<head><title> Fibonnaci via a Tag Library</title></head>

<body>

<h1>Fibonnaci via a Tag Library</h1>

<br/>

Calculation of fibonnaci(5):
<fib:calculate input="5">10</fib:calculate>

<br/><br/>
<hr noshade/>
<br/>

Calculation of set of fibs: 1 -> 10:<br/><br/>

<fib:calculaterange start="1" end="10">fibonnaci(0):
                               0</fib:calculaterange>

</body>
</html>

About the Author

Dion Almaer is a senior consultant for CustomWare in Boulder, CO. He can be reached at [email protected].