I am not 100% sure this is the problem, but you generally can't use <%= %>
in an attribute value unless it is the whole thing.

Not okay:
<some:tag attribute="my favorite number is <%=i%>" />

Okay:
<some:tag attribute='<%= "my favorite number is " + i %>' />

<% String value = "my favorite number is " + i; %>
<some:tag attribute="<%=value%>" />

-Max

----- Original Message -----
From: "Michael Marrotte" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 10:13 PM
Subject: interpolated runtime values are forbidden?


> I'm using a map-backed form and get the following error:
>
> 500 Servlet Exception
> /tt-pay/pages/UnpaidCitations.jsp:20: interpolated runtime values are
> forbidden
> by the JSP spec at `payCitation(<%= unpaidCitation.getCitation() %>)'
>
>
> --------------------------------------------------------------------------
--
> ----
> Resin 2.1.4 (built Fri Aug 2 14:16:52 PDT 2002)
>
>
> With the following implementation:
>
> [ActionForm]
> ...
> public final class CheckoutForm extends ActionForm {
>   private HashMap payCitations = new HashMap();
>
>   public Object getPayCitation(String key) {
>     return (payCitations.get(key));
>   }
>
>   public void setPayCitation(String key, Object value){
>     payCitations.put(key, value);
>   }
> ...
>
> [JSP]
> ...
> <logic:iterate id="unpaidCitation" name="unpaidCitaions" >
> <tr>
>   <td>
>     <html:checkbox property="payCitation(<%= unpaidCitation.getCitation()
> %>)"/>
>     <bean:write name="unpaidCitation" property="citation" filter="true"/>
>   </td>
> ...
>
> Any ideas on what's wrong here or how to do this another way, with a Map
> (trying to stay away from idexes)?
>
> --Mike
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to