accessbean.jsp.

Enterprise Java
Tag Libraries: JSPs in the Enterprise
by Dion Almaer
Listing 5. accessbean.jsp.


<html>
<head><title> Fibonnaci via an Access Bean </title></head>

<body>

<h1>Fibonnaci via an Access Bean</h1>

<br/>

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

<%= fib.calculateFibonacci( request ) %>

<br/>
<hr noshade/>

<form method="post" action="accessbean.jsp">

Calculate Fibonnaci for the following number:
<input type="text" name="num" size="3" maxlength="2">
<input type="submit" value="Calculate">
</form>

</body>
</html>

About the Author

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