You're creating the bean "status" in the varStatus declaration in your c:forEach action. It's in scope in the loop as "status" already, so you don't need to re-initialize it. You can access its attributes inside your loop:

<c:out value="$status.begin" />
<c:out value="$status.count" />
<c:out value="$status.index" />

...etc.

Just curious; what're you trying to do inside the loop?

Curtis
--
c dot tee at verizon dot net


bOOyah wrote:
It's killing me. Here's the snippet:

[ServletException in:/pages/editscheduledetails.jsp]
/pages/editscheduledetails.jsp(276,6) jsp.error.useBean.duplicate'
org.apache.jasper.JasperException: /pages/editscheduledetails.jsp(276,6)

My assumption in that the Jasper compiler thinks I have attempted to use a bean multiple times in the same scope or something.


Here's the only piece of that JSP that uses a bean:


Line 276:

<c:forEach items="${ScheduleDetailsForm.eventsList}"
           var="event" varStatus="status">
  <jsp:useBean id="status"
               type="javax.servlet.jsp.jstl.core.LoopTagStatus"/>
...


If I change "status" to "qwerty" it all works fine! The JSP books say that the 'varStatus' variable is local to the 'c:forEach' loop! How can I be declaring duplicate beans? I even added a scope="page" to the 'useBean' clause, but it made no difference.


I'm not explicitly including other JSPs in this JSP...I'm using Tiles and Struts.

Google only returns very scant info about 'jsp.error.useBean.duplicate' :-(


Thanks for any help.




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



Reply via email to