I'm not Karr by the way. In any event, using "sessionScope.mbox.list" might not
have any impact on the output, but my main concern is that you're using the
name of a JSTL implicit object in your loop. If what JSTL is really doing
with "${header.from}" is looking for an HTTP header called "from", it
definitely will impact your output.
Quoting Vernon Wu <[EMAIL PROTECTED]>:
>
> Thanks, Karr. The change, however, shalln't have any impact on the final
> output, shall it?
>
>
> 10/21/2002 12:33:03 PM, Kris Schneider <[EMAIL PROTECTED]> wrote:
>
> >You don't need the jsp:useBean action for JSTL to get at mbox. You can just
> do:
> >
> ><c:forEach var="header"
> > items="${sessionScope.mbox.list}"
> > varStatus="status">
> >
> >"header" is an implicit object in JSTL, so I'd call your iteration var
> >something else, like "hdr".
> >
> >Quoting Vernon Wu <[EMAIL PROTECTED]>:
> >
> >>
> >> To illustrate the problem, I provide the following two parts of
> code/file
> >> sample.
> >>
> >> In a JSP file, I have the followings:
> >>
> >> <jsp:useBean
> >> id="agentHelper"
> >> class="com.xxx.web.client.AgentHelper"
> >> scope="session"
> >> />
> >>
> >> <c:set value="${agentHelper.newMembers}" var="pageResults" />
> >>
> >> <c:forEach var="item" items="${pageResults.list}" >
> >> <tr>
> >> <td class="TableRowColor"><c:out
> >value="${item.headline}" /></td>
> >> <td class="TableRowColor">
> >> <c:url value="search-by-id-action.do"
var="viewItemURL">
> >> <c:param name="id"
value="${item.userId}"/>
> >> </c:url>
> >> <a href='<c:out
value="${viewItemURL}"/>'
> >onmouseover="img_on
> >> ('signout')" onmouseout="img_off('signout')">
> >> <c:out value="${item.userId}" />
> >> </a>
> >> </td>
> >> <td class="TableRowColor"><c:out
value="${item.age}"/></td>
> >> </tr>
> >> </c:forEach>
> >>
> >> This page works fine. I use the other implementation method using MVC
> pattern
> >> instead for another page. In the
> >> controller, I have the followings:
> >>
> >> session.setAttribute("mbox", a.openMessageBox(0, 10));
> >>
> >> The data is correct at this point. And in the following JSP file I have
> the
> >> followings:
> >>
> >> <jsp:useBean
> >> id="mbox"
> >> class="com.xxx.web.client.model.Page"
> >> scope="session"
> >> />
> >>
> >> <c:forEach var="header" items="${mbox.list}" varStatus="status">
> >> <tr>
> >> <td>
> >> <input type="checkbox" name="checkbox" value="checkbox">
> >> </td>
> >> <td> </td>
> >> <td><c:out value="${header.from}"/></td>
> >> <td><c:out value="${header.subject}"/></td>
> >> <td> </td>
> >>
> >> </tr>
> >> </c:forEach>
> >>
> >> The iteration is walked through, but no data is displayed. I don't
> understand
> >> why the second implemention doesn't
> >> display the data. Can anyone see a problem here/
> >>
> >> Thanks,
> >>
> >> Vernon
> >>
> >>
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> >> <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
> >> For additional commands, e-mail:
> >> <mailto:taglibs-user-help@;jakarta.apache.org>
> >>
> >>
> >
> >
> >--
> >Kris Schneider <mailto:kris@;dotech.com>
> >D.O.Tech <http://www.dotech.com/>
> >
>
>
>
>
--
Kris Schneider <mailto:kris@;dotech.com>
D.O.Tech <http://www.dotech.com/>
--
To unsubscribe, e-mail: <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>