Re: Facings issues while migrating from Struts 2.5.x to 6.7
Lukasz Lenart <[email protected]> Wed, 29 Jan 2025 07:30:22 +0100
| Newsgroups | gmane.comp.jakarta.struts.user |
|---|---|
| Message-ID | <CAMopvkNOeP-3TMgJfYUYU56k3Mc4puZesSM0V=TC4WcO4Z3kRg@mail.gmail.com> |
wt., 28 sty 2025 o 07:31 Murali Challa <[email protected]> napisał(a): > > We get the availableItems from session. > > That is the only difference in can see from your example. > > Can you try something link below and see if it works? > > <s:iterator value="#session.availableItems" var="item" status="s"> > ${item.empid} > ${s.index} // index as well coming as empty > </s:iterator> It works, btw. I had to configure allowlist list like this (or you can disable this functionality) <constant name="struts.allowlist.enable" value="true" /> <constant name="struts.parameters.requireAnnotations" value="true" /> <constant name="struts.allowlist.packageNames" value=" org.apache.struts2.showcase.model, org.apache.struts2.showcase.modelDriven.model "/> <constant name="struts.allowlist.classes" value=" org.apache.struts2.showcase.hangman.Hangman, org.apache.struts2.showcase.hangman.Vocab "/> > > We set availableItems to session in our struts action layer as below. > > session.setAttribute("availableItems", availableItems); How do you obtain reference to "session"? Do you use SessionAware interface? Regards Łukasz