My ListThread class extends Action.  And in the
ListThread class, I first retrieve some of the text
fields; i.e., request.getParameter( ... );
Thereafter, I want to pass the request scope together
with some parameters to another class for some further
processing.  This is what I do:

public final class ListThread extends Action
{
   public ActionForward execute(ActionMapping mapping,
                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response)
                throws Exception 
   {

      String offset = request.getParameter( "offset"
);
      String size = request.getParameter( "size" );

      ...........

      SiteUtil.prepareNavigate( request, offset, size,
           MessageInboxConfig.ROWS_IN_THREADS );

      ...........

   }
}


public class SiteUtil 
{
   public static void prepareNavigate   
     (HttpServletRequest request, int offset, int    
                     collectionSize, int totalRows) 
   {
      int startOffset = offset + 1;
      int lastOffset = offset + collectionSize;
      request.setAttribute("StartOffset", new
Integer(startOffset));
      request.setAttribute("LastOffset", new
Integer(lastOffset));
   }
}




__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to