java - name are not displaying on jsp -
private customergroup customergroup; public customergroup getcustomergroup () { return customergroup; } public void setcustomergroup (customergroup customergroup) { this.customergroup= customergroup; }
when print customergroup
shows group name fine. system.out.println("customer group "+customerrecord.getcustomergroup().getgroupname());
but when display on jsp doesn't show group name, show class name package.
<%@ taglib prefix="s" uri="/struts-tags"%> <s:iterator value="list"> <s:property value="customergroup"/> </s:iterator>
because on console explicitly printing name using, system.out.println("customer group "+customerrecord.getcustomergroup().getgroupname());
and in jsp printing customergroup
<s:property value="customergroup"/>
which of course different.
try this, instead
<s:property value="customergroup.groupname"/>
Comments
Post a Comment