If you're using JSTL in struts all the object will be available without drilling through the scopes.

In straight JSTL you'd use sessionScope. But as you're using struts you dont need to and you can decide what you want to scope to in you java or configuration of the ActionServlet..

HTH Mark

On 25 Sep 2004, at 15:27, M. Onur Tokan wrote:

Hi,

I am in a strange confusion about Beans and JSP communication. For
example I have the following code that displays list of musics.
'musiclist' is a Collection variable which is set in the ActionClass
on the session scope. The problem is; How can <c:forEach> tag
recognises musiclist variable. Should'nt it be something  like
<c:forEach items='${getSession.musiclist}''

--
Regards,
M. Onur Tokan



<c:forEach items='${musiclist}' var='ml' varStatus='status'>
                                <c:choose>
                                <c:when test='${(status.count % 2) == 0}'>
                                        <tr Style="background:#FFFF99">
                                </c:when>
                                <c:otherwise>
                                        <tr Style="background:#FFFFEE">
                                </c:otherwise>
                                </c:choose>
                                <td align="right"><c:out value='${status.count}'/></td>
                                <td align="right"><a 
href="album.do?action2=view&id=<c:out
value='${ml.id}'/>">
                                                <c:out value='${ml.album}' />
                                        </a></td>
                                <td align="right"><c:out value='${ml.artist}'/></td>
                                <td align="right"><c:out value='${ml.year}'/></td>
                                <td align="right">
                                        <a href="album.do?action2=delete&id=<c:out 
value='${ml.id}'/>"
onclick="javascript:return(confirm('<fmt:message
key='musiclist.delete.msg'/>'));">
                                                <fmt:message key="musiclist.delete" />
                                        </a></td>
                        </tr>
</c:forEach>

---------------------------------------------------------------------
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]



Reply via email to