Hi.
I'm unable to use
jsp:getProperty to display result, any help will be apprecialted. The bean has getter and setter. My code is:
<%@ page import="java.sql.*"%>
<%@ page import="db.cashTypeBean"%>
<jsp:useBean id="cashType" class="db.cashTypeBean">
<jsp:setProperty name="cashType" property="*">
<%
Connection conn = null;
Statement stat = null;
ResultSet result = null;
cashTypeBean cType = new cashTypeBean();
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
...
if(result.next()){
System.out.println(cash type:" + results.getString("CSH_TYP_CD")); // ok, i got the data
cType.setCode(results.getString("CSH_TYPE_CD"));
cType.setName(results.getString("LKUP_NM"));
}
connection.close():
}catch...{}
finally{}
%>
</jsp:userBean>
<html>
<body>
<p>
Cash Type =
<jsp:getProperty name="cashType" property="code"/>
<p>
Description =
<jsp:getProperty name="cashType" property="name"/>
</body>
</html>
Thanks in advance.