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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -