code: public void displayDialog() throws IOException, JspException, ServletException {
  
          switch (getAction()) {
  
              case ACTION_CANCEL:
                  // ACTION: cancel button pressed
                  actionCloseDialog();
                  break;
  
              case ACTION_OK:
                  // ACTION: ok button pressed
                  setParamAction(DIALOG_OK);
                  actionCommit();
                  if (getException() == null) {
                      // file successfully copied to server
                      break;
                  }
  
                  //$FALL-THROUGH$
              case ACTION_DEFAULT:
              default:
                  // ACTION: show dialog (default)
                  setParamAction(DIALOG_OK);
                  JspWriter out = getJsp().getJspContext().getOut();
                  out.print(defaultActionHtml());
          }
      }
docs: Performs the dialog actions depending on the initialized action and displays the dialog form.<p>
  
  @throws JspException if dialog actions fail
  @throws IOException if writing to the JSP out fails, or in case of errors forwarding to the required result page
  @throws ServletException in case of errors forwarding to the required result page