Hi Heikki,

First of all, could you start a new thread as this one is about
migrating from Struts 2.5.x to 6.x and your problem is related to
migrating to Struts 7.x?
Also could you share a full example of your Java & JSP code? Looks
like the <s:iterator/> and <s:a/> are connected based on the used
${subject} variable, but I'm just guessing.

niedz., 26 sty 2025 o 14:55 Heikki Hyyrö <heikki.hy...@tuni.fi> napisał(a):
>
> Hi,
>
> I would of course *love* to provide a small example, but it seems a bit
> difficult (would probably require quite considerable effort for just
> that purpose). The application in question contains e.g. 100+ JSP files
> and the pages are composed in a component-wise/hierarchical manner with
> the tiles framework, etc.
>
> If it helps anyone understand what the problems could be related to, I
> have noticed a couple more things.
>
> If I create the iterator variable separately by changing
>
> <s:iterator value="subjects" var="subject">
>      <h2>${subject.name}</h2>
> </s:iterator>
>
> into
>
> <s:iterator value="subjects">
>      <s:set var="subject"/>
>      <h2>${subject.name}</h2>
> </s:iterator>
>
> the names appear also in 7.0.0. The same problem (and the "fix"
> described above) seem to apply to more or less all of the quite numerous
> loops used in the application's JSP files.
>
> Another thing is that I had problems with url parameters in 7.0.0. The
> application follows the Struts "a"-tag documentation and creates links
> in the following manner:
>
> <s:url action="viewSubject" var="viewUrl">
>      <s:param name="id" value="#subject.id" />
> </s:url>
> <s:a href="%{viewUrl}">
>      ${subject.name}
> </s:a>
>
> Such links stopped working in 7.0.0: the href is seemingly ignored and
> the url becomes just the encompassing action url. But prepending the url
> variable reference with #, ie. href="%{#viewUrl}, results in correct
> href:s also in 7.0.0.
>
> Best Regards
> Heikki
>
>
> ---------------------------------------------------------------------
> 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