Results 1 to 2 of 2
  1. #1
    Jack2011 is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Default [Struts] How can I start iterating from 2 instead of 0 in my struts loop ?

    Hi,

    I would like to start my loop iterate from the number 2 and not 0.
    Therefore i have realised in the class jsp with struts the following :


    Java Code:
    	<logic:iterate id="ListeFonc" name="LISTE_FONCTION_REQUEST" indexId="indexLF" >
    	<% indexLF = indexLF + 2; %>
    I got the following error with my jsp page :

    D:\Dev\Eclipse\workspaceV02_7a_exploit\.metadata\. plugins\org.eclipse.wst.server.core\tmp0\work\Cata lina\localhost\mediweb-webapp\org\apache\jsp\jsp\corps\admin\Modification Utilisateur_jsp.java:1603: operator + cannot be applied to java.lang.Integer,int
    indexLF = indexLF + 2;
    How can i start my loop from 2 instead of 0 ?

    Thanks

  2. #2
    Jack2011 is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Default Re: [Struts] How can I start iterating from 2 instead of 0 in my struts loop ?

    The solution is in the manual :
    iterate (Struts Taglib Tag library documentation)

    I just need to add the property offset="2" in iterate

Similar Threads

  1. Replies: 1
    Last Post: 12-06-2011, 04:30 PM
  2. Struts: How to display a grid in Struts??
    By fabbero in forum New To Java
    Replies: 1
    Last Post: 07-13-2011, 06:18 PM
  3. How to start with Struts
    By blackpanther in forum New To Java
    Replies: 0
    Last Post: 12-30-2010, 06:13 PM
  4. struts-config.xml in struts.
    By arjun_duddu in forum Advanced Java
    Replies: 0
    Last Post: 09-01-2010, 02:54 PM
  5. decorator.jsp problem building Struts Menu in JSP when Struts action is used
    By dkirvan in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-29-2010, 06:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •