/**
   * Process the specified HTTP request, and create the corresponding HTTP response (or forward to
   * another web component that will create it). Return an <code>ActionForward</code> instance
   * describing where and how control should be forwarded, or <code>null</code> if the response has
   * already been completed.
   *
   * @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 we are processing
   * @param response The HTTP response we are creating
   * @exception Exception if business logic throws an exception
   */
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    // Extract attributes we will need
    MessageResources messages = getResources(request);

    // save errors
    ActionMessages errors = new ActionMessages();

    // START check for login (security)
    if (!SecurityService.getInstance().checkForLogin(request.getSession(false))) {
      return (mapping.findForward("welcome"));
    }
    // END check for login (security)

    // START get id of current quote from either request, attribute, or cookie
    // id of quote from request
    String quoteId = null;
    quoteId = request.getParameter("quoteViewId");

    // check attribute in request
    if (quoteId == null) {
      quoteId = (String) request.getAttribute("quoteViewId");
    }

    // id of quote from cookie
    if (quoteId == null) {
      quoteId = StandardCode.getInstance().getCookie("quoteViewId", request.getCookies());
    }

    Integer id = Integer.valueOf(quoteId);

    // END get id of current quote from either request, attribute, or cookie

    // get quote to and then its sources
    Quote1 q = QuoteService.getInstance().getSingleQuote(id);

    // this quotes sources
    Set sources = q.getSourceDocs();

    DynaValidatorForm qvgatd1 = (DynaValidatorForm) form;

    qvgatd1.set("sources", (SourceDoc[]) sources.toArray(new SourceDoc[0]));

    // place quote into attribute for dispaly
    request.setAttribute("quote", q);

    // Forward control to the specified success URI
    return (mapping.findForward("Success"));
  }