• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem using logic:iterate  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

i am using the following code in my jsp:

<%@ page import="java.io.*,java.util.*" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<HTML>
<BODY>

<html:link action="Csv" target="_blank"><b>Missing Files Output in Excel Sheet Format </html:link>
<br>
<br>

<table>

<jsp:useBean id="rglist" scope="session" class="java.util.ArrayList" />

<jsp:useBean id="filelist" scope="session" class="java.util.ArrayList" />

<jsp:useBean id="size" scope="session"/>

<logic:iterate id="rg" name="rglist" indexId="i">

<bean:write name="rg" />

<logic:iterate id="file" name="filelist" offset="i" length="1">
***line 27
<bean:write name="file" "/>

</logic:iterate>

<logic:iterate id="sz" name="size" offset="i" length="1">

<bean:write name="sz" />

</logic:iterate>

</logic:iterate>

<table>

</HTML>
</BODY>


Nothing gets displayed on this page. There is no error in Tomcat but in tomcat logs it gives an error "jsp(27,0) jsp.error.unterminated.tag".
Here "size" is a long[].

Please help

Regards
sameer
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

Is this a typo error?.If its not then you will have to do away with the extra ".
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see any missing end tags in the code you're showing us. You're obviously not showing us everything, though, because I don't see and <tr> or <td> tags inside the <table></table> block.

Try this: make a copy of the file. Then remove all the <logic:iterate></logic:iterate> tag pairs and replace them one at a time. After each replacement, try displaying the JSP. When it finally gets an error, you'll know the offending code is what you replaced just before displaying the jsp.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!