Could you try to use:

<s:iterator value="#session.list" var="menu" status="s">

?

śr., 29 sty 2025 o 07:57 Murali Challa <challamura...@gmail.com> napisał(a):
>
> Session is referenced using
> ServletActionContext.getRequest().getSession(false) in action classes.
>
> Our's is legacy application where all our action classes extend
> xwork2.ActionSupport class and no annotations are used in it.
>
> Thanks,
> Murali
>
>
>
>
>
> On Wed, 29 Jan, 2025, 12:00 Lukasz Lenart, <lukaszlen...@apache.org> wrote:
>
> > wt., 28 sty 2025 o 07:31 Murali Challa <challamura...@gmail.com>
> > 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
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to