A JSP page that gets properties from a bean

By: Hisham Alssadi  

<jsp:useBean id=\"bean1\" class=\"com.awl.bean1\"/>
<p> here is some data that came from bean1:</p>
<LI> the name of the bean is :
<jsp:getProperty name=\"bean1\" property=\"name\"/>
<LI> the 7th prime number is:
<jsp:getProperty name=\"bean1\" property=\"sevenPrimeNumber\"/ >
<LI>the current time is :
<jsp:getProperty name=\"bean1\" property=\"currentTime\"/>
<TD BGCOLOR=\"<jsp:getProperty name=\"bean1\" property=\"color\"/>\">
<P> the information from a bean can be used anywhere on the page!</P>

Archived Comments

Most Viewed Articles (in JSP )

Latest Articles (in JSP)

Comment on this tutorial