Hi,
what exactly it means it in <c:set> tag target is used to set the value of map or bean. so the target value should be the actual object..
Le me explain with example how target should be used...
<% Map map = createMap();%>
<c:set target="<%=map%>" ....>
the value of target should evaluate to actual map object..
You should not use that in the following way...
<%
// This can very well go into
servlet also.
Map map = createMap();
request.setAttribute("map", map);
%>
<c:set target="map" ...../>
this is wrong.. because target is evaluating to
string or attribute name and it is not evaluating to actual map..
bottom line, is always you need to assign target value using expression.
Hope, I made sense.
Originally posted by Edmund Yong:
In page 446 of HFSJ, it says that the "target" is not for the attribute name of the bean or map, but for the actual attribute object.
I am not sure what it really means, because in page 486 Q4, the "target" is used as an attribute name without any problem.