Code: Select all
<html>
<body>
<h1>Simple Bean Usage</h1>
<%
pageContext.setAttribute("account", new com.enthuware.jwebplus.Account(1, "Bobby", 1000.0));
%>
Account Name is :
<jsp:useBean id="account" class="com.enthuware.jwebplus.Account">
<jsp:setProperty name="account" property="name" param="name"/>
</jsp:useBean>
<%=account.getName()%>
</body>
</html>