Enterprise Java
Tag Libraries: JSPs in the Enterprise
by Dion Almaer
Listing 2. usebean.jsp.

<head><title> Fibonnaci via a Java Bean </title></head>


<h1>Fibonnaci via a Java Bean </h1>


<jsp:useBean id="fib" class="com.customware.fib.Fibonnaci"/>

<% for (int x=0; x < 10; x++) { %>
   Fibonacci[<%= x %>] = <%= fib.calculateFibonacci( x ) %><br/>
<% } %>


About the Author

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


Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events