FileDocCategorySizeDatePackage
BeerSelectAction.javaAPI DocExample1040Sat Jun 26 17:26:02 BST 2004com.example.web

BeerSelectAction

public class BeerSelectAction extends org.apache.struts.action.Action

Fields Summary
Constructors Summary
Methods Summary
public org.apache.struts.action.ActionForwardexecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)


      // Cast the form to the application-specific form
      BeerSelectForm myForm = (BeerSelectForm) form;

      // Process the business logic
      BeerExpert be = new BeerExpert();
      ArrayList result = be.getBrands(myForm.getColor());

      // Forward to the Results view
      // (and store the data in the request-scope)
      request.setAttribute("styles", result);
      return mapping.findForward("show_results");