jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mfncoo...@gmail.com>
Subject Re: core:set - to java.util.Map????
Date Sun, 30 Jan 2005 01:57:33 GMT
There are two problems with your example, both in the use of <c:set>.
You should have this:

  <c:set target="${map}" property="id" value="${something}"/>

That is, the value of 'target' needs to be the map itself, not the
name of the map; and you need to quote the value of the 'value'
attribute.

--
Martin Cooper


On Sun, 30 Jan 2005 03:29:53 +0200, Alexander Panzhin
<whereabout@mail333.com> wrote:
> Have a problem. Correct me if I'm wrong.
> 
> According to JSTL docs c:set should be able to set properties not only
> to beans but to Maps too.
> 
> Sample JSP code:
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
> <%
> java.util.HashMap map = new java.util.HashMap();
> request.setAttribute("map", map);
> %>
> <c:set target="map" property="id" value=${something}/>
> 
> - This code throws exception " &lt;set&gt; invalid property "id" ".
> Is this behavour correct?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message