usebean.jsp.

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


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

<body>

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

<br/>

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

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

</body>
</html>

About the Author

Dion Almaer is a senior consultant for CustomWare in Boulder, CO. He can be reached at dion@customware.com.

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.