wood burning stoves 2.0*
The moose likes Struts and the fly likes Exception in using logic:iterate tag's  'indexId' property in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Exception in using logic:iterate tag Watch "Exception in using logic:iterate tag New topic
Author

Exception in using logic:iterate tag's 'indexId' property in struts

poli reddy
Greenhorn

Joined: Nov 21, 2007
Posts: 15
When i use <logic:iterate> 'indexId' property in struts, I am getting following exception:

Compilation of 'C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_QPanel_QPanel\jsp_servlet\__maincategory.java' failed:
--------------------------------------------------------------------------------
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_QPanel_QPanel\jsp_servlet\__maincategory.java:536: operator + cannot be applied to java.lang.Integer,int
probably occurred due to an error in /MainCategory.jsp line 51:
<td width="10%" align="center"><%= rowSeq+1 %></td>


He is my few lines of code which causing compilation error:

<logic:iterate id="cId" property="mainCategoryGrid" name="frmMainCategory" indexId="rowSeq">
<tr>
<td width="10%" align="center"><%= rowSeq+1 %></td>
<td width="30%" align="left"><bean:write name="cId" property="mainCategoryName"/></td>
<td width="45%" align="left"><bean:write name="cId" property="desc"/></td>
</tr>
</logic:iterate>

I am using weblogic server 8.1.

Can anyone give me solution??
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
An index ID is always of type Integer, not int. Therefore you will need to change your expression to:
<%= rowSeq.intValue()+1 %>


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in using logic:iterate tag's 'indexId' property in struts
 
Similar Threads
Deploying WAR file Weblogic 8.1
JavaBean and jsp Help
exception at 3 line and last line also (NoClassDefFoundError)
JSP and JavaBeans Help
Hot to deploy struts application in weblogic8.1 with SP4