Re: Facings issues while migrating from Struts 2.5.x to 6.7
Lukasz Lenart <[email protected]> Tue, 28 Jan 2025 07:01:26 +0100
| Newsgroups | gmane.comp.jakarta.struts.user |
|---|---|
| Message-ID | <CAMopvkO0RtpXc8T6zaLPEH+4g8dDA+7R2=oMU9G0R-dC9AfjRw@mail.gmail.com> |
pon., 27 sty 2025 o 08:41 Murali Challa <[email protected]> napisał(a): > > Hi Lukasz, > > Yes, the values in session exist. > > We are able to iterate through session.list and while trying to print values of session.list using EL, empty values are getting printed. > > EL is inside <td> tag and we can see table with empty rows (here rows count is equal to session.list size) is getting displayed in UI. I assume your code is similar to this example: https://github.com/apache/struts/blob/main/apps/showcase/src/main/webapp/WEB-INF/empmanager/listEmployees.jsp#L49-L55 And I modified it like this (additional column with "empId"): <table class="table table-striped table-bordered table-hover table-condensed"> <tr> <th>Id</th> <th>Id</th> <th>First Name</th> <th>Last Name</th> </tr> <s:iterator value="availableItems"> <tr> <td><a href="<s:url action="edit-%{empId}" />"><s:property value="empId"/></a></td> <td>${empId}</td> <td><s:property value="firstName"/></td> <td><s:property value="lastName"/></td> </tr> </s:iterator> </table> and all works just fine. Cheers Łukasz