Hi!

I am evaluating struts for a new project. One problem I wasn't able to solve
was the integration of JSP expressions inside the attributes of
custom tags.

My code looks like this:

<logic:iterate id="pelement" name="MyBean" property="pelements">
 <% String name = ((PElement)pelement).getName(); %>
 <html:link href="/<%= name %>/index.jsp">
                   ^^^^^^^^^^^ Here is my problem!
    <bean:write name="pelement" property="longname"/>
 </html:link><br />
</logic:iterate>

The links always contain the <%= name %> string instead of the evaluated
expression. I tried it with different quoting techniques but without luck.

What is the correct solution here?

TIA,
Erich

Reply via email to