<html>
<head>
<title>Using a Bean</title>
</head>
<body>
<h1><center> Using a Bean </center></h1>
<font size="+1"><b>
<jsp:useBean id="a_student" class="mybeans.studentBean" scope="page"> </jsp:useBean>
<jsp:setProperty name="a_student" property="name"
value="Sam Smith"/>
<jsp:setProperty name="a_student" property="year"
value="Junior"/>
<jsp:setProperty name="a_student" property="testgrade"
value="96"/>
<p>The a_student Name is:
<jsp:getProperty name="a_student" property="name"/>
</p>
<p>The Year is:
<jsp:getProperty name="a_student" property="year"/>
</p>
<p>The Entrance Examination Score:
<jsp:getProperty name="a_student" property="testgrade"/>
</p>
<p>The Whole Story:
<jsp:getProperty name="a_student" property="all"/>
</p>
</b></font>
</body>
</html>
use_studentBean.jsp