Examples of ServletException


Examples of javax.servlet.ServletException

        sform.setGroups(user.getGroupsIds());
        sform.setPassword(user.getPassword());       
       
      } catch (Exception e) {
        Mapping.rollback();
        throw new ServletException(e);
      }

      // Forward to the view page
      return (mapping.findForward("view"));
    }   

    // fill data | errors
    if (errors.size() > 0) {
      try {
        request.setAttribute(ERROR_KEY, errors);
               
      } catch (Exception e) {
        Mapping.rollback();
        throw new ServletException(e);
      }

      // Forward to the view page
      return (mapping.findForward("view"));
    }

    // all it's ok : update user
    try {
      Mapping.begin();
      User user = User.getInstance(id);
      user.setMetaData("name", sform.getName());
      user.setMetaData("email", sform.getEmail());
      user.setPassword(sform.getPassword());     
      Mapping.commit();
     
    } catch (Exception e) {
      Mapping.rollback();
      throw new ServletException(e);
    }

    // Forward to the next page
    return (mapping.findForward("ok"));
  }
View Full Code Here

Examples of javax.servlet.ServletException

            request.setAttribute("result", result);
          }
          Mapping.rollback();
        } catch (Exception e) {
          Mapping.rollback();
          throw new ServletException(e);
        }
      } else {
        ActionErrors errors = new ActionErrors();
        ActionError error = new ActionError("error.search.noKeyWords");
        errors.add("keys",error);
View Full Code Here

Examples of javax.servlet.ServletException

      zip.write(redirect.getBytes());
      zip.closeEntry();

      zip.close();
    } catch (Exception e) {
      throw new ServletException(e);
    }

    response.getOutputStream().flush();
    response.getOutputStream().close();
  }
View Full Code Here

Examples of javax.servlet.ServletException

   * @throws ServletException
   */
  protected void initParams() throws ServletException{
    sender = getInitParameter("sender");
    if(StringUtils.isEmpty(sender))
      throw new ServletException("Parameter sender is required.");
    mail_queue_path = getInitParameter("mail-queue-path");
    if(StringUtils.isEmpty(mail_queue_path))
      throw new ServletException("Parameter mail-queue-path is required.");
    else{
      if(mail_queue_path.startsWith(Globals.LOCAL_PATH_PREFIX)){
        mail_queue_path = mail_queue_path.substring(Globals.LOCAL_PATH_PREFIX.length());
      }
      else if(mail_queue_path.startsWith("/")){
View Full Code Here

Examples of javax.servlet.ServletException

    try {
      ResourceXmlBean bean =
        Resources.getResourceXmlBean(this, resourcesId);
      path = bean.getDirectory();
    } catch (Exception e) {
      throw new ServletException(e);
    }
    String realPath = getServletContext().getRealPath("/");
    File resources = new File(realPath, ResourceServlet.relativePath);
    File tresources = new File(resources, path);
    File tfile = new File(tresources, resourceId);
View Full Code Here

Examples of javax.servlet.ServletException

    ValueList valueList = null;
    try {
      valueList = valueListHome.create();
    } catch (CreateException e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }

    valueList.setDataSource(dataSource);
    ValueListVO listObject = valueList.getValueList(individualId, listParameters);
    listObject.setCurrentPageParameters(ValueListConstants.AMP+"rowId="+marketingListId);
View Full Code Here

Examples of javax.servlet.ServletException

        dynaForm.set("modifieddate", tVO.getModifiedOn().toString());
      }
      FORWARD_final = FORWARD_vieweditthread;
    } catch (Exception e) {
      logger.error("[execute]: Exception", e);
      throw new ServletException(e);
    }
    return mapping.findForward(FORWARD_final);
  }
View Full Code Here

Examples of javax.servlet.ServletException

      preferenceVector.add(preferenceVO);
      Preference preferenceEJB = (Preference)CVUtility.setupEJB("Preference", "com.centraview.preference.PreferenceHome", dataSource);
      preferenceEJB.updateUserPreference(individualId, preferenceVector);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    return(new ActionForward(returnPath.toString(), true));
  }
View Full Code Here

Examples of javax.servlet.ServletException

      {
        try {
          remote.updateIndividual(individualVO, individualId);
          } catch (Exception e) {
            logger.error("[execute] Exception thrown.", e);
            throw new ServletException(e);
          }
        request.setAttribute("TYPEOFOPERATION", "EDIT");
      }
      forward = new ActionForward(mapping.findForward(FORWARD_save).getPath(), false)
      request.setAttribute("TYPEOFSUBMODULE", AdminConstantKeys.PREFERENCEPAGE);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    return forward;
  }
View Full Code Here

Examples of javax.servlet.ServletException

    ValueList valueList = null;
    try {
      valueList = valueListHome.create();
    } catch (CreateException e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    valueList.setDataSource(dataSource);
    ValueListVO listObject = valueList.getValueList(individualId, listParameters);

    session.setAttribute("ticketPieChartParams", listParameters);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.