struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vikram.g.by...@accenture.com>
Subject Retrieving the values from list
Date Wed, 04 Mar 2009 09:21:40 GMT
Hi,

 

            I am setting the values retrieved from DB into a list
"sessionListDefects" in my Action class as shown below:

 

try

            {

                  DefectDelegate defectDelegate = new DefectDelegate();

                  sessionListDefects = defectDelegate.findDefect();

                  

                  

                  for (Iterator iterator = sessionListDefects.iterator();
iterator.hasNext();) {

                        DefectDTO defectDTO = (DefectDTO) iterator.next();

                        System.out.println("defectDTO.getDefectNo :
"+defectDTO.getDefectNo());

                        System.out.println("defectDTO.getProject :
"+defectDTO.getProject());

                        

                  }

                  

                  session.put(WebConstants.SESSION_LIST_DEFECTS,
sessionListDefects);

 

            }

 

 

            But I am not able to print the values from the list using the
iterator in JSP:

 

<s:iterator id="sessionListDefects" value="#session['sessionListDefects']">

                                                            <tr>

 
<td><s:property value="defectNo"/></td>

 
<td><s:property value="project"/></td>

                                                            </tr>

                                                </s:iterator>


 

 

            Please let me know the right syntax. 

 

Best Regards,

 

Vikram

 


Mime
View raw message