When you want to use Runtime Expression in a JSP tag, the full tag attribute value
must be RTexpression, not just part
of it :
<html:text property="<%= \"person\" + x %>" value=""/>
In your case you should think using indexed properties and logic:iterate to display
your datas.
Nico.
----- Original Message -----
From: "Jonathan Hawkins" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 4:26 PM
Subject: JSP Expression inside Struts html:text property
> Howdy -
>
> I have some JSP code that looks like this:
>
>
>
> <% for(int x=1;x <=7;x++){ %>
> <html:text property="person<%=x%>" value=""/>
> <% } %>
>
>
> of course I was expecting the HTML output to be something like:
>
> <input type="text" name="person1" value="">
> <input type="text" name="person2" value="">
> <input type="text" name="person3" value="">
> <input type="text" name="person4" value="">
> <input type="text" name="person5" value="">
> <input type="text" name="person6" value="">
> <input type="text" name="person7" value="">
>
> Instead I am getting :
>
>
> <input type="text" name="person<%=x%>" value="">
> <input type="text" name="person<%=x%>" value="">
> <input type="text" name="person<%=x%>" value="">
> <input type="text" name="person<%=x%>" value="">
> <input type="text" name="person<%=x%>" value="">
> <input type="text" name="person<%=x%>" value="">
> <input type="text" name="person<%=x%>" value="">
>
> Anyone have another way to achieve the desired output? I looked into
> the html:logic tag and think that may be the way to go, but I can't
> find an example
> Please help........super powers......failing.........must .....stop
> evil........bad code before it's........too late............
>
>
> thanks
> jonathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]