Hi,
I'm new to Tomcat/JSP
I have a JSP page that instantiates a bean, then it access the bean
through a scriptlet, it works fine. But when I replace the scriptlet by
a <jsp:getProperty.. tag, it doesn't work
Take my code below :
<%= employee.getFirstName() %> IS WORKING, it displays the employee's
firstname
<jsp:getProperty name="employee" property="firstName" /> IS NOT
WORKING, displays nothing
any idea why ?
<jsp:useBean id="employee" class="org.company.beans.EmployeeBean"
scope="request" />
<html><body>
<%
Vector<EmployeeBean> v =(Vector<EmployeeBean>)request.getAttribute("list");
Iterator i = v.iterator();
int j = 0;
while (i.hasNext()) {
employee = (EmployeeBean)i.next();
%>
<%= employee.getFirstName() %>
WORKS
<jsp:getProperty name="employee" property="firstName" /> DOESN'T
WORK !! WHY ?
<%
}
%>
</body></html>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org