On Fri, Jun 6, 2025 at 09:14 Ute Kaiser <ut...@web.de.invalid> wrote:
> Hi, > migrating from Struts1 I encounter in a jsp the error "Equal symbol > expected" at the "onclick" row. > I think my old quotes do not work any more with Struts2. > > Struts1: > <logic:iterate id="b" name="blabla" scope="request"> > <input type="button" value="Delete" > > onclick="javascript:if(confirmDelete()){document.getElementById('deleteid').value='<bean:write > name="b" property="id" />';}"/> > > Struts2: > <s:iterator value="blabla"> > <s:submit type="input" value="Delete" > > onclick="javascript:if(confirmDelete()){document.getElementById('deleteid').value='<s:property > value="id"/>';}"/> > > I tried 'id', \"id\", \'id\' "id" but nothing worked out This would be double-evaluation, JSP doesn’t work like this—tags can’t used as property values. But you should be able use standard JSP EL iirc. That said, I’d take the opportunity to clean up JSPs and JS since you’re rewriting everything anyway and split up the JS and markup if you’re not also migrating the front end away from JSP. Dave