@Override
    public int doStartTag() throws JspException {
        if (end != -1 && begin > end) {
            // JSTL 1.1. We simply do not execute the loop.
            return SKIP_BODY;
        }

        // we're beginning a new iteration, so reset our counts (etc.)
        index = 0;
        count = 1;
        last = false;

        // let the subclass conduct any necessary preparation
        prepare();

        // throw away the first 'begin' items (if they exist)
        discardIgnoreSubset(begin);

        // get the item we're interested in
        if (hasNext())
        // index is 0-based, so we don't update it for the first item
        {
            item = next();
        } else {
            return SKIP_BODY;
        }

        /*
         * now discard anything we have to "step" over.
         * (we do this in advance to support LoopTagStatus.isLast())
         */
        discard(step - 1);

        // prepare to include our body...
        exposeVariables();
        calibrateLast();
        return EVAL_BODY_INCLUDE;
    }
@ Override public int doStartTag ( ) throws JspException { if ( end != - 1 && begin > end ) { return SKIP_BODY ; } index = 0 ; count = 1 ; last = false ; prepare ( ) ; discardIgnoreSubset ( begin ) ; if ( hasNext ( ) ) { item = next ( ) ; } else { return SKIP_BODY ; } discard ( step - 1 ) ; exposeVariables ( ) ; calibrateLast ( ) ; return EVAL_BODY_INCLUDE ; }
Begins iterating by processing the first item.