All pastes #270592 Raw Edit

Someone

public text v1 · immutable
·published 2006-12-07 14:57 UTC
rendered paste body
 public ActionForward execute(ActionMapping mapping, ActionForm  form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        
        
        //products list
   List productList = (List) this.getServlet().getServletContext().getAttribute("productList");
        
        //product list size
        int productSize = productList.size();


        ////get product id from string
        String productID =  request.getQueryString();
        
       //go through list and calculate value
        for(int i=0; i<productSize; i++) {

            Product product = (Product) productList.get(i);

            if(productID.equals(order.getProductID())){

            //add to order

            return mapping.findForward("success");
        }
        //else go to error
        return mapping.findForward("error");
    }