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


            request.setAttribute("moduleId", String.valueOf(reportVO.getModuleId()));
        }
        catch(Exception e)
        {
            System.out.println("[Exception][DuplicateAdHocReportHandler.execute] Exception Thrown: " + e);
            throw new ServletException(e);
        }
        return mapping.findForward(nextURL);
    }
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
    {
      chartRemote = chartHome.create();
    }catch(CreateException e){
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    chartRemote.setDataSource(dataSource);
    Collection chartRawData = (Collection)chartRemote.getTicketPieData(individualId, listParameters);

    // Add the raw data to a JFree dataset
    DefaultPieDataset pieData = new DefaultPieDataset();

    int totalTickets = 0;
    Iterator iter = chartRawData.iterator();
    while (iter.hasNext())
    {
      HashMap row = (HashMap)iter.next();
      String userName = (String)row.get("name");
      Number openTickets = (Number)row.get("count");
      if(userName == null){
    userName = "UnAssigned";
    }
      totalTickets += openTickets.intValue();
      pieData.setValue(userName, openTickets);
    }

    // create the chart
    JFreeChart pieChart = ChartFactory.createPieChart("Open Tickets by User", pieData, true, true, false);

    // add the "Total Open Tickets" sub-title
    TextTitle t1 = new TextTitle("Total Open Tickets: " + String.valueOf(totalTickets),
                                 new Font("SansSerif", Font.PLAIN, 11));
    pieChart.addSubtitle(t1);

    // set the chart visual options
    PiePlot plot = (PiePlot)pieChart.getPlot();
    plot.setForegroundAlpha(0.65f);
    plot.setNoDataMessage("There are no currently open tickets.");

    // print the chart image directly the the HTTP stream
    OutputStream out = response.getOutputStream();
    response.setContentType("image/jpeg");

    try
    {
      ChartUtilities.writeChartAsJPEG(out, 1.0f, pieChart, 400, 300);
    }catch(IOException e){
      logger.error("[getOpportunityPieData] Exception thrown.", e);
      throw new ServletException(e);
    }finally{
      out.close();
    }

    // return null (don't forward anywhere, we've done the output already)
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

      if (templateId == null) {
        try {
          ptVO = PTRemote.getDefaultPrintTemplate(individualID, categoryId);
        } catch (Exception e) {
          logger.error("[Exception] PTListHandler.Execute Handler ", e);
          throw new ServletException(e);
        }
      } else {
        try {
          ptVO = PTRemote.getPrintTemplate(templateId.intValue());
        } catch (Exception e) {
          logger.error("[execute] Exception thrown.", e);
          throw new ServletException(e);
        }
      }
      dynaform.set("artifactname", ptVO.getArtifactName());
      dynaform.set("artifactid", String.valueOf(ptVO.getArtifactId()));
      if (actionType == null) {
View Full Code Here

        moduleId = Integer.parseInt(strId);
      } catch (NumberFormatException nfe) {
        moduleId = ReportConstants.ENTITY_MODULE_ID;
      }
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    return moduleId;
  }
View Full Code Here

      } catch (NumberFormatException nfe) {
        templateId = 0;
      }
    } catch (Exception ex) {
      logger.error("[getTheId] Exception thrown.", ex);
      throw new ServletException(ex);
    }
    return templateId;
  }
View Full Code Here

      String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
      getReportList(request, dataSource, "StandardReport", ValueListConstants.STANDARD_REPORT_LIST_TYPE, ValueListConstants.standardReportViewMap, moduleId, new ArrayList());
      session.removeAttribute("standardreportform");
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    // based on the module ID pick the forward name this name is used to set the selections on the left nav.
    String forwardName = "";
    switch (moduleId) {
      case 14: forwardName = ".view.reports.contacts.standard"; break;
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.