base/struts-tools/src/main/com/thesett/common/webapp/actions/PageAction.java
public ActionForward executeWithErrorHandling(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response, ActionErrors errors) throws Exception
    {
        // Get a reference to the session.
        HttpSession session = request.getSession(false);

        // Extract the page form.
        DynaActionForm pageForm = (DynaActionForm) form;
        log.fine("pageForm = " + pageForm);

        // Get the paged list object from the session.
        String listingVarName = pageForm.getString(VAR_NAME_PARAM);
        log.fine("listingVarName = " + listingVarName);

        PagedList pagedList = (PagedList) session.getAttribute(listingVarName);

        // Set its current page.
        pagedList.setCurrentPage((Integer) pageForm.get(NUMBER_PARAM));

        // Set its index offset if one is specified.
        Integer index = (Integer) pageForm.get(INDEX_PARAM);

        if (index != null)
        {
            pagedList.setCurrentIndex(index);
        }

        // Forward to the success location.
        return mapping.findForward(SUCCESS_FORWARD);
    }
public ActionForward executeWithErrorHandling(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response, ActionErrors errors) throws Exception
    {
        // Get a reference to the session.
        HttpSession session = request.getSession(false);

        // Extract the page form.
        DynaActionForm pageForm = (DynaActionForm) form;
        log.fine("pageForm = " + pageForm);

        // Get the paged list object from the session.
        String listingVarName = pageForm.getString(VAR_NAME_PARAM);
        log.fine("listingVarName = " + listingVarName);

        PagedList pagedList = (PagedList) session.getAttribute(listingVarName);

        // Set its current page.
        pagedList.setCurrentPage((Integer) pageForm.get(NUMBER_PARAM));

        // Set its index offset if one is specified.
        Integer index = (Integer) pageForm.get(INDEX_PARAM);

        if (index != null)
        {
            pagedList.setCurrentIndex(index);
        }

        // Forward to the success location.
        return mapping.findForward(SUCCESS_FORWARD);
    }
Updates the current page or index offset of a paged list in the session scope.

<p/>This perform method is the same as the normal perform method but it is called from inside an error wrapper
that catches all throwables. The wrapper automatically generates Struts error messages for any Java throwable
that may fall through this method.

<p/>Implementations should override this method to use the default error handling.

@param  mapping  The ActionMapping used to select this instance
@param  form     The optional ActionForm bean for this request (if any)
@param  request  The HTTP request.
@param  response The HTTP response.
@param  errors   A struts errors object to write any error messages to.

@return A struts forward to tell struts where to go after this action.

@throws Exception Any exceptions are allowed to fall through to the top level handler.