Package javax.servlet

Examples of javax.servlet.ServletException


        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);
      }

      final int emailTableID = 33;
      final int emailModuleID = 79;
View Full Code Here


    try {
      contactFacade = (ContactFacade)CVUtility.setupEJB("ContactFacade",
          "com.centraview.contact.contactfacade.ContactFacadeHome", dataSource);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    entityVO = contactFacade.getEntity(Integer.parseInt(viewEntityId));
    DynaActionForm entityForm = (DynaActionForm)form;
    entityVO.populateFormBean(entityForm);

    CustomField customField = null;
    try {
      customField = (CustomField)CVUtility.setupEJB("CustomField",
          "com.centraview.customfield.CustomFieldHome", dataSource);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    // Only 8 custom fields fit on the detail screen so we have to pull only the
    // first 8 out.
    TreeMap customFieldMap = customField.getCustomFieldData("Entity", entityVO.getContactID());
    Collection customFieldValues = customFieldMap.values();
    int arraySize = customFieldValues.size() > 4 ? 4 : customFieldValues.size();
    CustomFieldVO[] fieldArray = new CustomFieldVO[arraySize];
    Iterator i = customFieldValues.iterator();
    int count = 0;
    while (i.hasNext() && count < 4) {
      fieldArray[count++] = (CustomFieldVO)i.next();
    }
    entityForm.set("customFields", fieldArray);
    // Useful Stuff for the request (common things for every type of screen so
    // we don't have to program for each different form bean)
    request.setAttribute("recordType", "Entity");
    request.setAttribute("recordName", entityVO.getName());
    request.setAttribute("recordId", viewEntityId);
    request.setAttribute("dynamicTitle", entityVO.getName());
    request.setAttribute("parentId", new Integer(entityVO.getList()));
    request.setAttribute("parentName", "");
    request.setAttribute("marketingList", new Integer(entityVO.getList()));
    // if we clicked copy to, then show this data on the simple copyto jsp.
    if (request.getParameter("copyTo") != null) {
      return mapping.findForward(".view.contact.copyto");
    }
    // Right Nav stuff
    entityForm.set("mocTypeList", Globals.MOC_TYPE);
    int rpp = 15;
    String currentParam = request.getParameter("current");
    int current = 1;
    try {
      current = Integer.valueOf(currentParam).intValue();
    } catch (Exception e) {}
    String selectedIds = request.getParameter("rowId");
    ValueListParameters listParameters = new ValueListParameters(
        ValueListConstants.ENTITY_LIST_TYPE, rpp, current);
    String filter = "SELECT entity.entityId FROM entity WHERE entityId IN (" + selectedIds + ")";
    listParameters.setFilter(filter);
    ArrayList columns = new ArrayList();
    FieldDescriptor nameField = (FieldDescriptor)ValueListConstants.entityViewMap.get("Name");
    listParameters.setSortColumn(nameField.getQueryIndex());
    listParameters.setSortDirection("ASC");
    columns.add(nameField);
    listParameters.setColumns(columns);
    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);
    }
    ValueListVO listObject = valueList.getValueList(individualId, listParameters);
    // Paging stuff.
    int total = listObject.getParameters().getTotalRecords();
    long totalPages = (long)Math.ceil((double)total / rpp);
View Full Code Here

      for (int j = 0; j < memberIds.length; j++) {
        remote.deleteGroupMember(memberIds[j], groupId);
      }
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    StringBuffer path = new StringBuffer(mapping.findForward("viewGroup").getPath());
    path.append(groupId);
    return new ActionForward(path.toString(), true);
  }
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

      // object as an attribute. The JSP will then obtain the
      // DisplayList from the attribute and display it.
      forwardPage = riListType;
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    return (mapping.findForward(forwardPage));
  } // end execute() method
View Full Code Here

      recordNameURL = java.net.URLEncoder.encode(recordName, "ISO-8859-1");
      parentNameURL = java.net.URLEncoder.encode(parentName, "ISO-8859-1");
    } catch (UnsupportedEncodingException e) {
      // well I guess if ISO-8859-1 encoding isn't going to work we are in bad trouble
      logger.error("[setupButtons] Exception thrown.", e);
      throw new ServletException(e);
    }
    ArrayList buttonList = new ArrayList();
    String standardParams = "listType="+listType+"&listFor="+listFor+"&recordID="+recordId+"&recordName="+recordNameURL;
    String parameters = "";
View Full Code Here

         WebAppController controller = (WebAppController)container.getComponentInstanceOfType(WebAppController.class);
         controller.service(req, res);
      }
      catch (Throwable t)
      {
         throw new ServletException(t);
      }
   }
View Full Code Here

      Mapping.rollback();     

    } catch (Exception e) {
      Mapping.rollback();     
      //transmet l'exception a tomcat
      throw new ServletException(e);
    }
  }
View Full Code Here

    public void init(ServletConfig config) throws ServletException {
        super.init(config);
        if (wrapper != null) {
            getContainerWrapperBean().setWrapper(wrapper);
        } else {
            throw new ServletException("Wrapper is null");
        }
    }
View Full Code Here

   {

      public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
         ServletException
      {
         throw new ServletException();
      }
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.