Package javax.servlet

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);
      listParameters.setExtraId(eventID);
      ValueListVO listObject = valueList.getValueList(individualId, listParameters);
View Full Code Here


    String type = request.getParameter("typeId");
    if ((type == null) || (type == "")) {
      String row = request.getParameter("rowId");
      if ((row == null) || (row == "")) {
        throw new ServletException("No activity selected");
      }
      rowId = Integer.parseInt(row);

      ActivityFacadeHome activityFacadeHome = (ActivityFacadeHome)CVUtility.getHomeObject(
          "com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");
      try {
        ActivityFacade remote = activityFacadeHome.create();
        remote.setDataSource(dataSource);
        typeId = remote.getActivityType(rowId);
      } catch (CreateException ce) {
        logger.error("[execute] Exception thrown.", ce);
        throw new ServletException(ce);
      }
    } else {
      typeId = Integer.parseInt(type);
    }
View Full Code Here

    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);
    ArrayList buttonList = new ArrayList();
View Full Code Here

    ValueList valueList = null;
    try {
      valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    // there are no permissions for sources.
    ValueListVO listObject = valueList.getValueList(0, listParameters);
    ArrayList buttonList = new ArrayList();
    buttonList.add(new Button("Select", "select", "lu_selectList('Source');", false));
View Full Code Here

    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);
    ArrayList buttonList = new ArrayList();
   
View Full Code Here

    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);
    ArrayList buttonList = new ArrayList();
View Full Code Here

    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);
   
    ArrayList buttonList = new ArrayList()
View Full Code Here

        AdvancedSearchHome advancedSearchHome = (AdvancedSearchHome)CVUtility.getHomeObject("com.centraview.advancedsearch.AdvancedSearchHome", "AdvancedSearch");
        remoteAdvancedSearch = advancedSearchHome.create();
        remoteAdvancedSearch.setDataSource(dataSource);
      } catch (Exception e) {
        System.out.println("[Exception][SearchForm.execute] Exception Thrown getting EJB connection: " + e);
        throw new ServletException(e);
      }
      // because we can get reposted get the current criteria from the form.
      // As we may be manipulating the searchCriteria, adding rows, and such.
      SearchCriteriaVO[] searchCriteria = (SearchCriteriaVO[])adhocReportForm.get("searchCriteria");

      // Build dem drop downs
      // if necessary.
      HashMap allFields = (HashMap)adhocReportForm.get("allFields");
      ArrayList tableList = (ArrayList)adhocReportForm.get("tableList");
      ArrayList conditionList = (ArrayList)adhocReportForm.get("conditionList");
      if (conditionList == null || conditionList.isEmpty()) {
        // This will get us the possible search conditions.
        HashMap conditionMap = SearchVO.getConditionOptions();
        // Build an ArrayList of LabelValueBeans
        conditionList = AdvancedSearchUtil.buildSelectOptionList(conditionMap);
        // stick it on the form
        adhocReportForm.set("conditionList", conditionList);
      }
      if (tableList == null || tableList.isEmpty()) {
        HashMap tableMap = remoteAdvancedSearch.getSearchTablesForModule(individualId, moduleId);
        // Build an ArrayList of LabelValueBeans
        tableList = AdvancedSearchUtil.buildSelectOptionList(tableMap);
        adhocReportForm.set("tableList", tableList);

        // if we had to add get the tableList we more than likely
        // have to build the allFields map, so its probably worth the zillion
        // cpu cycles we will have to waste.

        // Get all the appropriate field lists and stick them on the formbean
        // The fieldList (ArrayList of LabelValueBean) will be stored in a
        // HashMap with the key being the (Number)tableId
        TreeSet keySet = new TreeSet(tableMap.keySet());
        Iterator keyIterator = keySet.iterator();
        allFields = new HashMap();
        while (keyIterator.hasNext()) {
          Number key = (Number)keyIterator.next();
          // iterate the tables and get all the field lists
          // stick them in a hashmap of arraylists on the form bean.
          HashMap tableFields = remoteAdvancedSearch.getSearchFieldsForTable(individualId, key.intValue(), moduleId);
          ArrayList tableFieldList = AdvancedSearchUtil.buildSelectOptionList(tableFields);
          allFields.put(key, tableFieldList);
        } // end while(keyIterator.hasNext())
        adhocReportForm.set("allFields", allFields);
      }

      // See if we need to add or remove rows from the search criteria array.
      // and do it.
      String addRow = (String)adhocReportForm.get("addRow");
      if (addRow.equals("true")) {
        searchCriteria = AdvancedSearchUtil.addRow(searchCriteria);
        adhocReportForm.set("addRow", "false");
      }
      String removeRow = (String)adhocReportForm.get("removeRow");
      if (!removeRow.equals("false")) {
        searchCriteria = AdvancedSearchUtil.removeRow(searchCriteria, removeRow);
        adhocReportForm.set("removeRow", "false");
      }
      // now that the criteria is ready stick it on the formbean.
      adhocReportForm.set("searchCriteria", searchCriteria);

      ReportVO reportVO = new ReportVO();
      reportVO.setSelect(selects);
      // This parses the fields from the form bean and builds up an arraylist of
      // ReportContentVOs which represent what is selected.  This is then stuck on the
      // reportVO which is stuck on the request
      reportVO.setSelectedFields(getSelectedFieldsWithNames((String)adhocReportForm.get("contentFields"), (String)adhocReportForm.get("contentOrders"), (String)adhocReportForm.get("contentFieldNames")));
      request.setAttribute("pagedata", reportVO);
      // I think this should probably live on the adhocreportform, rather than worrying
      // about something on the request.  But here it is for now.
      request.setAttribute("reportType", String.valueOf(ReportConstants.ADHOC_REPORT_CODE));
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    String forwardName = "";
    switch (moduleId) {
      case 14: forwardName = ".view.reports.entities.adhoc"; break;
      case 15: forwardName = ".view.reports.individuals.adhoc"; break;
View Full Code Here

    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);
   
    ArrayList buttonList = new ArrayList()
View Full Code Here

    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);
    ArrayList buttonList = new ArrayList();
View Full Code Here

TOP

Related Classes of javax.servlet.ServletException

Copyright © 2018 www.massapicom. 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.