public int doEndTag() throws JspException {
    if ((jspFile.indexOf("..") >= 0)
        || (jspFile.toUpperCase().indexOf("/WEB-INF/") != 0)
        || (jspFile.toUpperCase().indexOf("/META-INF/") != 0))
      throw new JspTagException("Invalid JSP file " + jspFile);

    InputStream in = pageContext.getServletContext().getResourceAsStream(jspFile);

    if (in == null) throw new JspTagException("Unable to find JSP file: " + jspFile);

    InputStreamReader reader = new InputStreamReader(in);
    JspWriter out = pageContext.getOut();

    try {
      out.println("<body>");
      out.println("<pre>");
      for (int ch = in.read(); ch != -1; ch = in.read())
        if (ch == '<') out.print("&lt;");
        else out.print((char) ch);
      out.println("</pre>");
      out.println("</body>");
    } catch (IOException ex) {
      throw new JspTagException("IOException: " + ex.toString());
    }
    return super.doEndTag();
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n\n");

      // Get the current user's ac
      WTAccountCredentials ac = WTAccountCredentials.current();
      SecureInfoManagerImpl sim = new SecureInfoManagerImpl();

      // Setup for permission checking
      boolean editInterfaces = false;
      if (sim.canEditEntity(ProtectedResourceConstants.PR_INTERFACES, ac)) editInterfaces = true;
      pageContext.setAttribute("editInterfaces", new Boolean(editInterfaces));

      out.write("  \n");

      String hostIP = null;
      try {
        hostIP = InetAddress.getLocalHost().getHostAddress();
        //    out.print(hostIP);

      } catch (UnknownHostException ex) {
        throw new Exception("Could not determine the local host address", ex);
      }

      out.write("\n\nvar javaScriptVar=\"");
      out.print(hostIP);
      out.write("\";\nvar javaScriptVar2=\"");
      out.print(editInterfaces);
      out.write("\";\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
Beispiel #3
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);
    if (exception != null) {
      response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("\r\n");
      out.write("<title>Error Page</title>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body bgcolor=\"blue\">\r\n");
      out.write("\t<font size=\"16\" color=\"white\">Your page generated an error:\"<br />\r\n");
      out.write("\t\tException:<br /></font>\r\n");
      out.write("\t");
      out.print(exception.toString());
      out.write("\r\n");
      out.write("\r\n");
      out.write("</body>\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/xml;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");

      HttpSession user = request.getSession(true);
      Notification newNotice = (Notification) user.getAttribute("newNotice");
      List exclude = new ArrayList();
      exclude.add(NotificationWizardServlet.WT_VENDOR_NAME); // Exclude WebTelemetry

      out.print(buildTree(newNotice, exclude));
      out.write("\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");
      out.write("// Temporary fix for GWT localization BISERVER-3640\n");
      out.write("document.write(\"<meta name='gwt:property' content='locale=");
      out.print(LocaleHelper.getLocale().toString());
      out.write("'/>\");\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n\r\n");

      final DisplayState theDisplayState = (DisplayState) request.getAttribute(MasterServlet.STATE);
      final Frame frame = (Frame) request.getAttribute(AbstractChip.FRAME_KEY);

      /*
       //to be definitive NOT serializable
      InputStream noser = (InputStream)session.getAttribute( "NOT_SERIALIZABLE");
      if( noser==null )
      {
      	session.setAttribute( "NOT_SERIALIZABLE", new ByteArrayInputStream( new byte[0] ));
      }
      */

      out.write('\r');
      out.write('\n');

      final AbstractItemTreeNodeChip theChip =
          (AbstractItemTreeNodeChip) request.getAttribute(AbstractChip.CHIP_KEY);

      out.write("\r\n<input type=\"hidden\" name=\"");
      out.print(theChip.getEventID(AbstractTreeNodeChip.EDIT));
      out.write("\" value=\"");
      out.print(AbstractChip.FALSE);
      out.write(
          "\" />\r\n<table class=\"abstractItemTreeNodeChip\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t<tr>\r\n\t\t<td class=\"aitncIcon\">\r\n\t\t\t<div onclick=\"document.editorForm.elements['");
      out.print(theChip.getEventID(AbstractTreeNodeChip.EDIT));
      out.write("'].value='");
      out.print(AbstractChip.TRUE);
      out.write("';setScrollAndSubmit();\">\r\n\t\t\t\t<img src=\"");
      out.print(theChip.getIcon());
      out.write(
          "\" border=\"0\">\r\n\t\t\t</div>\r\n\t\t</td>\r\n\t\t<td class=\"aitncName\">\r\n\t\t\t<div onclick=\"document.editorForm.elements['");
      out.print(theChip.getEventID(AbstractTreeNodeChip.EDIT));
      out.write("'].value='");
      out.print(AbstractChip.TRUE);
      out.write("';setScrollAndSubmit();\">\r\n\t\t\t\t");
      out.print(theChip.getName());
      out.write("\r\n\t\t\t</div>\r\n\t\t</td>\r\n\t</tr>\r\n\t");

      if (theChip.isExpanded()) {
        for (final Iterator it = theChip.getAllChildren().iterator(); it.hasNext(); ) {
          final AbstractTreeNodeChip child = (AbstractTreeNodeChip) it.next();

          out.write("\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"aitncTreeIMG\" background=\"");
          out.print(it.hasNext() ? "images/vert.gif" : "");
          out.write("\">\r\n\t\t\t\t\t\t\t");

          if (child.hasChildren()) {
            if (child.isExpanded()) {

              out.write("<input type=\"hidden\" name=\"");
              out.print(child.getEventID(AbstractTreeNodeChip.COLLAPSE));
              out.write("\" value=\"");
              out.print(AbstractChip.FALSE);
              out.write("\" /><div onclick=\"document.editorForm.elements['");
              out.print(child.getEventID(AbstractTreeNodeChip.COLLAPSE));
              out.write("'].value='");
              out.print(AbstractChip.TRUE);
              out.write("';setScrollAndSubmit();\">");

              if (it.hasNext()) {

                out.write("<img src=\"images/minus.gif\"></td>");

              } else {

                out.write("<img src=\"images/minusend.gif\"></td>");
              }

              out.write("</div>");

            } else {

              out.write("<input type=\"hidden\" name=\"");
              out.print(child.getEventID(AbstractTreeNodeChip.EXPAND));
              out.write("\" value=\"");
              out.print(AbstractChip.FALSE);
              out.write("\" /><div onclick=\"document.editorForm.elements['");
              out.print(child.getEventID(AbstractTreeNodeChip.EXPAND));
              out.write("'].value='");
              out.print(AbstractChip.TRUE);
              out.write("';setScrollAndSubmit();\">");

              if (it.hasNext()) {

                out.write("<img src=\"images/plus.gif\"></td>");

              } else {

                out.write("<img src=\"images/plusend.gif\"></td>");
              }

              out.write("</div>");
            }
          } else {
            if (it.hasNext()) {

              out.write("<img src=\"images/horiz.gif\"></td>");

            } else {

              out.write("<img src=\"images/end.gif\"></td>");
            }
          }

          out.write("\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class=\"aitncContext\">");
          child.render(pageContext);
          out.write("</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t");
        }
      }

      out.write("\r\n</table>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<!-- DW6 -->\r\n<head>\r\n<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>DEPTHS</title>\r\n<link rel=\"stylesheet\" href=\"../css/unitTemplate.css\" type=\"text/css\"/>\r\n</style><style type=\"text/css\">\r\n  <!--\r\n    .copyrightStyle {\r\n    font-size: 12px;\r\n    color: #006699;\r\n    }\r\n  -->\r\n</style>\r\n\r\n<script language=\"javascript\" src=\"js/matching_columns.js\" type=\"text/javascript\"></script>\r\n</head>\r\n<!-- JSP code -->\r\n");
      depths.presentationModule.teacher.TeacherBean teacherBeanId = null;
      synchronized (session) {
        teacherBeanId =
            (depths.presentationModule.teacher.TeacherBean)
                _jspx_page_context.getAttribute("teacherBeanId", PageContext.SESSION_SCOPE);
        if (teacherBeanId == null) {
          teacherBeanId = new depths.presentationModule.teacher.TeacherBean();
          _jspx_page_context.setAttribute(
              "teacherBeanId", teacherBeanId, PageContext.SESSION_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      depths.presentationModule.admin.AdminBean adminBeanId = null;
      synchronized (session) {
        adminBeanId =
            (depths.presentationModule.admin.AdminBean)
                _jspx_page_context.getAttribute("adminBeanId", PageContext.SESSION_SCOPE);
        if (adminBeanId == null) {
          adminBeanId = new depths.presentationModule.admin.AdminBean();
          _jspx_page_context.setAttribute("adminBeanId", adminBeanId, PageContext.SESSION_SCOPE);
        }
      }
      out.write("\r\n\r\n");
      out.write('\r');
      out.write('\n');
      privilegies = teacherBeanId.getTeacherPrivilegies();
      out.write("\r\n\r\n");
      out.write('\r');
      out.write('\n');
      if (privilegies.isEmpty()) {
        hasPrivilegies = "guest";
      } else {
        hasPrivilegies = "Limited";
        int privNumb = privilegies.size();
        for (int i = 0; i < privNumb; i++) {
          String priv = privilegies.get(i).toString();

          if (priv.equals("create new student")) {
            hasPrivilegies = "create new student";
          }
        }
      }

      out.write("\r\n\r\n\r\n\r\n");
      if (!hasPrivilegies.equals("Limited")) {
        out.write(
            "\r\n<body>\r\n\r\n<div id=\"page\">\r\n<DIV id=masthead>\r\n<DIV id=globalNav><a href=\"#\">Performance</a> |\r\n<a href=\"#\">Statistic</a> |\r\n<a href=\"#\">Tools</a> |\r\n<a href=\"#\">Help</a>\r\n</DIV><!--globalNav-->\r\n</DIV><!--mastHead-->\r\n  <div id=\"navBar\" class=\"column\">\r\n  <div id=\"blank\">\r\n    <p>&nbsp;</p>\r\n    <p>&nbsp;</p>\r\n    <p>&nbsp;</p>\r\n  </div> <!--blank-->\r\n  <div id=\"search\">\r\n    <label>Links</label>\r\n  </div><!--search-->\r\n  <div id=\"sectionLinks\">\r\n\r\n     <a href=\"editMyProfilePage.jsp\" >Edit my profile</a>\r\n\r\n\t<br />\r\n\r\n\r\n  </div><!--sectionLinks-->\r\n  <div id=\"search\">\r\n    <br/>\r\n    <br/>\r\n    <label>Passed concepts</label>\r\n  </div> <!--search-->\r\n  <div id=\"sectionLinks\">\r\n\r\n\r\n\r\n\r\n  <a href=\"bla bla\" >bla bla\r\n    </a><br />\r\n\r\n\r\n  </div><!--sectionLinks-->\r\n  <div id=\"advert\">\r\n    <p>&nbsp;</p>\r\n  </div><!--adverts-->\r\n  <div id=\"headlines\">\r\n  </div><!--headlines-->\r\n</div><!--navBar-->\r\n<div id=\"content\" class=\"column\">\r\n\r\n  <div id=\"previousNextLinks\">\r\n    <div id=\"breadCrumb\">\r\n\r\n\r\n    </div><!--breadCrumb-->\r\n");
        out.write(
            "    <div id=\"breadCrumb2\">\r\n\r\n\r\n    </div>\r\n  </div><!--previousNextLinks-->\r\n  <br/>\r\n  <br/>\r\n  <h1 id=\"pageName\">Welcome to the DEPTHS learning system </h1>\r\n  <div class=\"story\">\r\n\r\n\r\n      <h2>&nbsp;</h2>\r\n\r\n      <TABLE width=500 align=center>\r\n      <FORM name=studentRegisterForm method=\"POST\" action=\"settingNewStudentData.jsp\">\r\n        <TBODY>\r\n        ");
        if (teacherBeanId.isStudentUserNameExist()) {
          out.write(
              "\r\n          <TR>\r\n            <TD class=PageTitle colSpan=2>\r\n              <FONT color=red>\r\n                <B>\r\n                  <BIG>You have selected username that is already in use.</BIG>\r\n                </B>\r\n              </FONT>\r\n            </TD>\r\n          </TR>\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>              Please choose another one or go to the existing users page\r\n\r\n            </TD>\r\n          </TR>\r\n        ");
        } else {
          out.write("\r\n        ");
          out.write(
              "\r\n          <TR>\r\n            <TD class=PageTitle colSpan=2>\r\n              <H2>New teacher registration</H2>\r\n            </TD>\r\n          </TR>\r\n        ");
          if (hasPrivilegies.equals("Guest")) {
            out.write(
                "\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>You do not have enough privilegies to create new student.</TD>\r\n          </TR>\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>You can only preview this option as a guest.</TD>\r\n          </TR>\r\n        ");
          } else {
            out.write(
                "\r\n          <TR>\r\n            <TD class=text vAlign=top align=left colSpan=2>Please fill form for new student.</TD>\r\n          </TR>\r\n        ");
          }
          out.write("\r\n        ");
        }
        out.write(
            "\r\n          <TR>\r\n            <TD>&nbsp;</TD>\r\n          </TR>\r\n          <TR>\r\n            <!--\r\n              <TD class=title align=left colSpan=2>Account information / about\r\n              you</TD>\r\n            -->\r\n          </TR>\r\n          <TR>\r\n            <TD class=text align=left colSpan=2>              All fields marked with an\r\n              <FONT color=red>\r\n                <B>\r\n                  <BIG>*</BIG>\r\n                </B>\r\n              </FONT>\r\n              are required.\r\n</TD>\r\n          </TR>\r\n          <TR>\r\n            <TD colSpan=2>\r\n              <TABLE cellSpacing=1 cellPadding=2 width=\"95%\" border=0>\r\n                <TBODY>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD width=\"30%\" align=left noWrap class=text>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      First name\r\n</TD>\r\n                    <TD width=\"12%\" align=left noWrap class=text>\r\n                      <INPUT size=50 name=firstName>\r\n                    </TD>\r\n");
        out.write(
            "                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      Last name\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=lastName>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>\r\n                      <FONT color=red>                        &nbsp;\r\n                        *\r\n</FONT>\r\n                      Username\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=userName checked>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>\r\n                      <FONT color=red>                        &nbsp;\r\n                        *\r\n</FONT>\r\n                      Email address\r\n");
        out.write(
            "</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=email>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      Your Password\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT type=password size=30 name=password>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;\r\n                      <FONT color=red>*</FONT>\r\n                      Repeat password\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT type=password size=30 name=passwordConfirmation>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n");
        out.write(
            "                      Address\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=30 name=address>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n                      City\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=30 name=city>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;\r\n                      &nbsp;&nbsp;\r\n                      Country of residence\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      ");
        adminBeanId.getCountries();
        out.write("\r\n                    ");
        adminBeanId.getCountriesIds();
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        numbOfCountries = adminBeanId.getNumbOfCountries();
        out.write(
            "\r\n                      <select name=\"selectedCountry\">\r\n                      ");
        for (int i = 0; i < numbOfCountries; i++) {
          out.write("\r\n                        ");
          countryId = adminBeanId.getCountryId(i);
          out.write("\r\n                        <OPTION value='");
          out.print(countryId);
          out.write('\'');
          out.write('>');
          out.print(adminBeanId.getCountryName(i));
          out.write("                        </OPTION>\r\n                      ");
        }
        out.write(
            "\r\n                      </select>\r\n\r\n\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n                      Organization\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=50 name=organization>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n                      Web Site\r\n</TD>\r\n                    <TD align=left noWrap class=text>\r\n                      <INPUT size=60 value=http:// name=webSite>\r\n                    </TD>\r\n                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=title noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n                      Your language\r\n                      settings\r\n</TD>\r\n                    <TD align=left noWrap class=text>&nbsp;</TD>\r\n");
        out.write(
            "                  </TR>\r\n                  <TR bgColor=#f0f0f0>\r\n                    <TD class=text noWrap align=left>                      &nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n\r\n              ");
        adminBeanId.getLanguages();
        out.write("\r\n                    ");
        adminBeanId.getLanguagesIds();
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        out.write("\r\n                    ");
        numbOfLanguages = adminBeanId.getNumbOfLanguages();
        out.write("\r\n                      <select name=\"language\">\r\n                      ");
        for (int i = 0; i < numbOfLanguages; i++) {
          out.write("\r\n                        ");
          languageId = adminBeanId.getLanguageId(i);
          out.write("\r\n                        ");
          languageName = adminBeanId.getLanguageName(i);
          out.write("\r\n\r\n                        <OPTION value='");
          out.print(languageId);
          out.write('\'');
          out.write('>');
          out.print(languageName);
          out.write(" </OPTION>\r\n\r\n                      ");
        }
        out.write(
            "\r\n                      </select>\r\n\r\n                    </TD>\r\n                    <TD align=left noWrap class=text>&nbsp;</TD>\r\n                  </TR>\r\n\r\n              </TABLE>\r\n            </TD>\r\n\r\n          <TR>\r\n            <TD align=center colSpan=2>\r\n              <input type=\"submit\" name=\"backButton\" value=\"Back\">&nbsp;&nbsp;\r\n              <INPUT type=submit value=Submit tabindex=\"0\">\r\n            </TD>\r\n          </TR>\r\n\r\n      </FORM>\r\n\r\n\r\n\r\n</TBODY>      </TABLE>\r\n\r\n\r\n\r\n\r\n      <p>&nbsp;</p>\r\n\r\n  </div><!--story-->\r\n</div><!--content-->\r\n<!--end content -->\r\n\r\n<!--end navbar -->\r\n<div id=\"siteInfo\" align=\"center\">\r\n  <a href=\"#\">About Us</a>\r\n  |\r\n  <a href=\"#\">Site Map</a>\r\n  |\r\n  <a href=\"#\">Privacy Policy</a>\r\n  |\r\n  <a href=\"mailto:[email protected]\">Contact Us</a>\r\n  <br/>\r\n  <span class=\"copyrightStyle\">    &copy;\r\n    2006 FON - School of Business Administration, University of Belgrade\r\n</span>\r\n</div><!-siteInfo-->\r\n<br/>\r\n</div>\r\n</body>\r\n");
      } else {
        out.write(
            "\r\n\r\n<script type=\"text/javascript\">\r\nvar name = confirm(\"ERROR: You do not have enough privilegies for this !\")\r\nif (name == true)\r\n{\r\nlocation=\"teacherWelcomeScreen.jsp\"\r\n}else{\r\n  history.go(-1);\r\n}\r\n</script>\r\n");
      }
      out.write("\r\n</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #8
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html;charset=utf-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\n');

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE html>\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<base href=\"");
      out.print(basePath);
      out.write("\">\n");
      out.write("\n");
      out.write("<title>工程师工作纪要 查看</title>\n");
      out.write("<meta http-equiv=\"pragma\" content=\"no-cache\">\n");
      out.write("<meta http-equiv=\"cache-control\" content=\"no-cache\">\n");
      out.write("<meta http-equiv=\"expires\" content=\"0\">\n");
      out.write("<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\n");
      out.write("<meta http-equiv=\"description\" content=\"This is my page\">\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\" />\n");
      out.write("<script type=\"text/javascript\" src=\"js/jquery.min.js\"></script>\n");
      out.write("<script type=\"text/javascript\" src=\"js/common.js\"></script>\n");
      out.write("</head>\n");

      WorksBean worksBean = (WorksBean) request.getAttribute("worksBean");

      if (worksBean == null) {
        return;
      }

      out.write("\n");
      out.write("<body>\n");
      out.write("\t<div class=\"container\">\n");
      out.write("\t\t<div class=\"header headermiddle\">\n");
      out.write("\t\t\t<div class=\"headermleft\"></div>\n");
      out.write("\n");
      out.write("\t\t\t<div class=\"headermright vText\" style=\" float: right\">\n");
      out.write("\t\t\t\t<div style=\"font-size:12px\">您好!欢迎您来到工程师工作纪要</div>\n");
      out.write("\t\t\t\t<div style=\"margin-top: 20px\">\n");
      out.write("\t\t\t\t");

      UserBean userBean = (UserBean) session.getAttribute("userBean");
      if (userBean == null) {

        out.write("\n");
        out.write("\t\t\t\t\t<a href=\"/login.jsp\" target=\"_blank\">登陆</a>\n");
        out.write("\t\t\t\t");

      } else {

        out.write("\n");
        out.write("\t\t\t\t\t<font class=\"fontsong17\">当前用户</font>: <font class=\"fontsong14\">");
        out.print(userBean.getName());
        out.write("</font>, &nbsp;\n");
        out.write(
            "\t\t\t\t\t<font class=\"fontsong17\"><a href=\"/login.jsp?action=logout\">退出</a></font>\n");
        out.write("\t\t\t\t");
      }

      out.write("\n");
      out.write("\t\t\t\t</div>\n");
      out.write("\t\t\t</div>\n");
      out.write("\t\t</div>\n");
      out.write("\t\t<!-- 导航 -->\n");
      out.write("\t\t<div class=\" headernav\">\n");
      out.write("\t\t\t<div class=\" nav\">\n");
      out.write("\t\t\t\t<ul>\n");
      out.write(
          "\t\t\t\t\t<li class=\"navcurrent\"><a href=\"/servlet/Works?howdo=list\">工作纪要</a></li>\n");
      out.write("\t\t\t\t\t<li><a href=\"/servlet/Customer?howdo=list\">客户管理</a></li>\n");
      out.write("\t\t\t\t\t<li><a href=\"/servlet/User?howdo=list\">帐号管理</a></li>\n");
      out.write("\t\t\t\t</ul>\n");
      out.write("\t\t\t</div>\n");
      out.write("\t\t</div>\n");
      out.write("\t\t<div class=\"titleDiv\">工作纪要查看</div>\n");
      out.write("\t\t<div class=\"titleLineDiv\"></div>\n");
      out.write("\t\t<div class=\"addContentDiv\">\n");
      out.write("\t\t\t<table class=\"addContentTable\" border=\"0\" cellspacing=\"0\"\n");
      out.write("\t\t\t\tcellpadding=\"0\">\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"120px\" align=\"right\">客户:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getCustomername());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"120px\" align=\"right\">工程师:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getUsername());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">事件属性:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getLevel());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">事件描述:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      out.print(worksBean.getDescribe());
      out.write("</div>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">二级单位:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getErjidanwei());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">客户联系人:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getKehulianxiren());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">联系方式:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getLianxifangshi());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">联系邮箱:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getLianximail());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">是否转800:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      if (worksBean.isIsphonecall()) {
        out.write('是');
        out.write(' ');
      } else {
        out.write(' ');
        out.write('否');
      }
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">800 case号码:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getPhonecallnumber());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">解决办法:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      out.print(worksBean.getSolution());
      out.write("</div>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">是否关闭:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px \">");
      if (worksBean.getIsclosed() == 1) {
        out.write('关');
        out.write('闭');
        out.write(' ');
      } else {
        out.write(' ');
        out.write('开');
        out.write('启');
      }
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">更新内容:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      if (worksBean.getNewcontent() != null) {
        out.write(' ');
        out.print(worksBean.getNewcontent());
        out.write(' ');
      }
      out.write("</div></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t");

      if (worksBean.getIsclosed() == 1 && worksBean.getClosedate() != null) {

        out.write("\n");
        out.write("\t\t\t\t<tr>\n");
        out.write("\t\t\t\t\t<td align=\"right\">关闭时间:</td>\n");
        out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
        out.print(worksBean.getClosedate());
        out.write("</span></td>\n");
        out.write("\t\t\t\t</tr>\n");
        out.write("\t\t\t\t");
      }

      out.write("\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\"></td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write(
          "\t\t\t\t\t\t<div class=\"divBtn ml20 fl mt20\" onclick=\"window.history.back(-1);\">返回</div></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t</table>\n");
      out.write("\n");
      out.write("\t\t</div>\n");
      out.write("\t\t");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html>\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("\r\n");
      out.write("<title>智友汇</title>\r\n");
      out.write("<meta http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("<meta http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("<meta http-equiv=\"expires\" content=\"0\">\r\n");
      out.write("<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\r\n");
      out.write("<meta http-equiv=\"description\" content=\"This is my page\">\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/css.css\" />\r\n");
      out.write("<script type=\"text/javascript\" src=\"/js/jquery.min.js\"></script>\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("\t<div class=\"footer\">\r\n");
      out.write("\t\r\n");
      out.write("\t<div class=\"footerbottom\">\r\n");
      out.write("\t<div style=\"margin-top: 10px;margin-bottom: 30px\">Copyright&copy;2015\r\n");
      out.write("\t\t\t北京恒光数码科技有限公司 版权所有</div>\r\n");
      out.write("\t</div>\r\n");
      out.write("\t</div>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("\n");
      out.write("\t\t<!-- end .container -->\n");
      out.write("\t</div>\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write('\n');
      out.write('\n');
      out.write('\n');

      request.setCharacterEncoding("UTF-8");
      boolean isRTL = UrlUtil.isRTL(request, response);
      String direction = isRTL ? "rtl" : "ltr";
      if (new RequestData(application, request, response).isMozilla()) {

        out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n");

      } else {

        out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
      }

      out.write(
          "<!------------------------------------------------------------------------------\n");
      out.write(" ! Copyright (c) 2000, 2007 IBM Corporation and others.\n");
      out.write(" ! All rights reserved. This program and the accompanying materials \n");
      out.write(" ! are made available under the terms of the Eclipse Public License v1.0\n");
      out.write(" ! which accompanies this distribution, and is available at\n");
      out.write(" ! http://www.eclipse.org/legal/epl-v10.html\n");
      out.write(" ! \n");
      out.write(" ! Contributors:\n");
      out.write(" !     IBM Corporation - initial API and implementation\n");
      out.write(
          " ------------------------------------------------------------------------------->");
      out.write('\n');
      out.write('\n');

      SearchData data = new SearchData(application, request, response);
      WebappPreferences prefs = data.getPrefs();

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<html lang=\"");
      out.print(ServletResources.getString("locale", request));
      out.write("\">\n");
      out.write("<head>\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
      out.write("\n");
      out.write("<title>");
      out.print(ServletResources.getString("SearchLabel", request));
      out.write("</title>\n");
      out.write("     \n");
      out.write("<style type=\"text/css\">\n");
      out.write("/* need this one for Mozilla */\n");
      out.write("HTML { \n");
      out.write("\twidth:100%;\n");
      out.write("\theight:100%;\n");
      out.write("\tmargin:0px;\n");
      out.write("\tpadding:0px;\n");
      out.write("\tborder:0px;\n");
      out.write(" }\n");
      out.write("\n");
      out.write("BODY {\n");
      out.write("\tbackground:");
      out.print(prefs.getToolbarBackground());
      out.write(";\n");
      out.write("\tborder:0px;\n");
      out.write("\theight:100%;\n");
      out.write("}\n");
      out.write("\n");
      out.write("TABLE {\n");
      out.write("\tfont: ");
      out.print(prefs.getToolbarFont());
      out.write(";\n");
      out.write("\tbackground:");
      out.print(prefs.getToolbarBackground());
      out.write(";\n");
      out.write("\tmargin: 0px;\n");
      out.write("\tpadding: 0px;\n");
      out.write("\theight:100%;\n");
      out.write("}\n");
      out.write("\n");
      out.write("FORM {\n");
      out.write("\tbackground:");
      out.print(prefs.getToolbarBackground());
      out.write(";\n");
      out.write("\theight:100%;\n");
      out.write("\tmargin:0px;\n");
      out.write("}\n");
      out.write("\n");
      out.write("INPUT {\n");
      out.write("\tfont: ");
      out.print(prefs.getToolbarFont());
      out.write(";\n");
      out.write("\tmargin:0px;\n");
      out.write("\tpadding:0px;\n");
      out.write("}\n");
      out.write("\n");
      out.write("INPUT {\n");
      out.write("    font-size: 1.0em;\n");
      out.write("}\n");
      out.write("\n");
      out.write("A {\n");
      out.write("\tcolor:WindowText;\n");
      out.write("\ttext-decoration:none;\n");
      out.write("}\n");
      out.write("\n");
      out.write("#searchTD {\n");
      out.write("\tpadding-");
      out.print(isRTL ? "right" : "left");
      out.write(":7px;\n");
      out.write("\tpadding-");
      out.print(isRTL ? "left" : "right");
      out.write(":4px;\n");
      out.write("}\n");
      out.write("\n");
      out.write("#searchWord {\n");
      out.write("\tmargin-left:5px;\n");
      out.write("\tmargin-right:5px;\n");
      out.write("\tborder:1px solid ThreeDShadow;\n");
      out.write("}\n");
      out.write("\n");
      out.write("#searchLabel {\n");
      out.write("\tcolor:WindowText;\n");
      out.write("}\n");
      out.write("\n");
      out.write("#go {\n");

      if (data.isMacMozilla()) {

        out.write("\n");
        out.write("    background:GrayText;\n");

      } else {

        out.write("\n");
        out.write("    background:ThreeDShadow;\n");
      }

      out.write("\n");
      out.write("\tcolor:Window;\n");
      out.write("\tfont-weight:bold;\n");
      out.write("\tborder:1px solid ThreeDShadow;\n");
      out.write("\tmargin-left:1px;\n");
      out.write("\tfont-size: 1.0em;\n");
      out.write("}\n");
      out.write("\n");
      out.write("#scopeLabel {\n");
      out.write("\ttext-decoration:underline; \n");
      out.write("\tcolor:#0066FF; \n");
      out.write("\tcursor:pointer;\n");
      out.write("\tpadding-left:15px;   /* This should be the same for both RTL and LTR. */\n");
      out.write("}\n");
      out.write("\n");
      out.write("#scope { \n");
      out.write("\ttext-align:");
      out.print(isRTL ? "left" : "right");
      out.write(";\n");
      out.write("\tmargin-");
      out.print(isRTL ? "right" : "left");
      out.write(":5px;\n");
      out.write("\tborder:0px;\n");
      out.write("\tcolor:WindowText;\n");
      out.write("\ttext-decoration:none;\n");
      out.write("}\n");
      out.write("\n");

      if (data.isIE()) {

        out.write("\n");
        out.write("#go {\n");
        out.write("\tpadding-");
        out.print(isRTL ? "right" : "left");
        out.write(":1px;\n");
        out.write("}\n");
      }

      out.write("\n");
      out.write("</style>\n");
      out.write("\n");
      out.write("<script language=\"JavaScript\">\n");
      out.write("var isIE = navigator.userAgent.indexOf('MSIE') != -1;\n");
      out.write(
          "var isMozilla = navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;\n");
      out.write("\n");
      out.write("var advancedDialog;\n");
      out.write("\n");
      out.write("function openAdvanced() \n");
      out.write("{ \n");
      out.write("    var scope = document.getElementById(\"scope\").firstChild;\n");
      out.write("    var workingSet = \"\"; \n");
      out.write("    if (scope != null) \n");
      out.write(
          "              workingSet = document.getElementById(\"scope\").firstChild.nodeValue;                \n");
      out.write("    var minSize = 300; \n");
      out.write("    var maxHeight= 500;  \n");
      out.write("    var maxWidth = 600;       \n");
      out.write("    var w = minSize; \n");
      out.write("    var h = minSize; \n");
      out.write("      \n");
      out.write(
          "    // If we have large fonts make the dialog larger, up to 500 pixels high, 600 wide\n");
      out.write("    try {         \n");
      out.write(
          "        var letterHeight = document.getElementById(\"searchWord\").offsetHeight; \n");
      out.write("        var requiredSize = 16 * letterHeight; \n");
      out.write("        if (requiredSize > minSize) { \n");
      out.write("            if (requiredSize < maxWidth) { \n");
      out.write("                w = requiredSize; \n");
      out.write("            } else { \n");
      out.write("                w =  maxWidth; \n");
      out.write("            }\n");
      out.write("            if (requiredSize < maxHeight) { \n");
      out.write("                h = requiredSize; \n");
      out.write("            } else {               \n");
      out.write("                h = maxHeight;\n");
      out.write("            }\n");
      out.write("        } \n");
      out.write("             \n");
      out.write("    } catch (e) {} \n");
      out.write("    \n");

      if (data.isIE()) {

        out.write("\n");
        out.write("\tvar l = parent.screenLeft + (parent.document.body.clientWidth - w) / 2;\n");
        out.write("\tvar t = parent.screenTop + (parent.document.body.clientHeight - h) / 2;\n");

      } else {

        out.write("\n");
        out.write("\tvar l = parent.screenX + (parent.innerWidth - w) / 2;\n");
        out.write("\tvar t = parent.screenY + (parent.innerHeight - h) / 2;\n");
      }

      out.write("\n");
      out.write("\t// move the dialog just a bit higher than the middle\n");
      out.write("\tif (t-50 > 0) t = t-50;\n");
      out.write("\t\n");
      out.write("\twindow.location=\"javascript://needModal\";\n");
      out.write(
          "\tadvancedDialog = window.open(\"workingSetManager.jsp?workingSet=\"+encodeURIComponent(workingSet), \"advancedDialog\", \"resizable=yes,height=\"+h+\",width=\"+w+\",left=\"+l+\",top=\"+t );\n");
      out.write("\tadvancedDialog.focus(); \n");
      out.write("}\n");
      out.write("\n");
      out.write("function closeAdvanced()\n");
      out.write("{\n");
      out.write("\ttry {\n");
      out.write("\t\tif (advancedDialog)\n");
      out.write("\t\t\tadvancedDialog.close();\n");
      out.write("\t}\n");
      out.write("\tcatch(e) {}\n");
      out.write("}\n");
      out.write("\n");
      out.write("/**\n");
      out.write(" * This function can be called from this page or from\n");
      out.write(" * the advanced search page. When called from the advanced\n");
      out.write(" * search page, a query is passed.\n");
      out.write(" * noRefocus is a boolean which if true suppresses\n");
      out.write(" * switch of focus to the search view\n");
      out.write(" */\n");
      out.write("function doSearch(query, noRefocus)\n");
      out.write("{\n");
      out.write("\tvar workingSet = document.getElementById(\"scope\").firstChild.nodeValue;\n");
      out.write("\n");
      out.write("\tvar form = document.forms[\"searchForm\"];\n");
      out.write("\tvar searchWord = form.searchWord.value;\n");
      out.write("\tvar maxHits = form.maxHits.value;\n");
      out.write("\tif (!searchWord || searchWord == \"\")\n");
      out.write("\t\treturn;\n");
      out.write("\tquery =\"searchWord=\"+encodeURIComponent(searchWord)+\"&maxHits=\"+maxHits;\n");
      out.write("\tif (workingSet != '");
      out.print(UrlUtil.JavaScriptEncode(ServletResources.getString("All", request)));
      out.write("')\n");
      out.write("\t\tquery = query +\"&scope=\"+encodeURIComponent(workingSet);\n");
      out.write("\t\t\n");
      out.write("\t/******** HARD CODED VIEW NAME *********/\n");
      out.write("\t// do some tests to ensure the results are available\n");
      out.write("\tif (parent.parent.HelpFrame && \n");
      out.write("\t\tparent.parent.HelpFrame.NavFrame && \n");
      out.write("\t\tparent.parent.HelpFrame.NavFrame.showView &&\n");
      out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame && \n");
      out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame.search && \n");
      out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame) \n");
      out.write("\t{\n");
      out.write("\t    if (!noRefocus) {\n");
      out.write("\t\t    parent.parent.HelpFrame.NavFrame.showView(\"search\");\n");
      out.write("\t\t}\n");
      out.write(
          "\t\tvar searchView = parent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;\n");
      out.write("\t\tsearchView.location.replace(\"searchView.jsp?\"+query);\n");
      out.write("\t}\n");
      out.write("}\n");
      out.write("\n");
      out.write("function getSearchWord() {\n");
      out.write("    var form = document.forms[\"searchForm\"];\n");
      out.write("    var searchWord = form.searchWord.value;\n");
      out.write("    if (searchWord ) {\n");
      out.write("        return searchWord;\n");
      out.write("    }\n");
      out.write("    return \"\";\n");
      out.write("}\n");
      out.write("\n");
      out.write("function rescope() {\n");
      out.write("    if (parent.parent.HelpFrame && \n");
      out.write("\t\tparent.parent.HelpFrame.NavFrame && \n");
      out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame) {\n");
      out.write("\t\tvar viewsFrame = parent.parent.HelpFrame.NavFrame.ViewsFrame;\n");
      out.write("\t\tif (viewsFrame.toc && viewsFrame.toc.tocViewFrame) {\n");
      out.write("\t\t    var tocView = viewsFrame.toc.tocViewFrame;\n");
      out.write("\t\t    tocView.repaint();\n");
      out.write("\t\t}\n");
      out.write("\t\tif (viewsFrame.index && viewsFrame.index.indexViewFrame) {\n");
      out.write("\t\t    var indexView = viewsFrame.index.indexViewFrame;\n");
      out.write("\t\t    indexView.repaint();\n");
      out.write("\t\t}\n");
      out.write("\t\tdoSearch(null, true);\n");
      out.write("\t}\n");
      out.write("}\n");
      out.write("\n");
      out.write("function fixHeights()\n");
      out.write("{\n");
      out.write("\tif (!isIE) return;\n");
      out.write("\t\n");
      out.write("\tvar h = document.getElementById(\"searchWord\").offsetHeight;\n");
      out.write("\tdocument.getElementById(\"go\").style.height = h;\n");
      out.write("}\n");
      out.write("\n");
      out.write("function onloadHandler(e)\n");
      out.write("{\n");
      out.write("\tvar form = document.forms[\"searchForm\"];\n");
      out.write("\tform.searchWord.value = '");
      out.print(UrlUtil.JavaScriptEncode(data.getSearchWord()));
      out.write("';\n");
      out.write("\tfixHeights();\n");

      if (data.isScopeRequest() && RequestScope.filterBySearchScope(request)) {

        out.write("\n");
        out.write("    rescope();\n");
      }

      out.write("\n");
      out.write("}\n");
      out.write("\n");
      out.write("</script>\n");
      out.write("\n");
      out.write("</head>\n");
      out.write("\n");
      out.write("<body dir=\"");
      out.print(direction);
      out.write("\" onload=\"onloadHandler()\"  onunload=\"closeAdvanced()\">\n");
      out.write("\n");
      out.write("\t<form  name=\"searchForm\"   onsubmit=\"doSearch()\">\n");
      out.write("\t<div role=\"search\">\n");
      out.write("\t\t<table id=\"searchTable\" align=\"");
      out.print(isRTL ? "right" : "left");
      out.write(
          "\" valign=\"middle\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" role=\"presentation\">\n");
      out.write("\t\t\t<tr nowrap  valign=\"middle\">\n");
      out.write("\t\t\t\t<td ");
      out.print(isRTL ? "nowrap" : "");
      out.write(" id=\"searchTD\">\n");
      out.write("\t\t\t\t\t<label id=\"searchLabel\" for=\"searchWord\" accesskey=\"");
      out.print(ServletResources.getAccessKey("SearchLabel", request));
      out.write("\">\n");
      out.write("\t\t\t\t\t&nbsp;");
      out.print(ServletResources.getLabel("SearchLabel", request));
      out.write("\n");
      out.write("\t\t\t\t\t</label>\n");
      out.write("\t\t\t\t</td>\n");
      out.write("\t\t\t\t<td>\n");
      out.write(
          "\t\t\t\t\t<input type=\"text\" id=\"searchWord\" name=\"searchWord\" value='' size=\"24\" maxlength=\"256\" \n");
      out.write("\t\t\t\t\t       alt=\"");
      out.print(UrlUtil.htmlEncode(ServletResources.getString("expression_label", request)));
      out.write("\" \n");
      out.write("\t\t\t\t\t       title=\"");
      out.print(UrlUtil.htmlEncode(ServletResources.getString("expression_label", request)));
      out.write("\">\n");
      out.write("\t\t\t\t</td>\n");
      out.write("\t\t\t\t<td >\n");
      out.write(
          "\t\t\t\t\t<input type=\"submit\" role=\"button\" onclick=\"this.blur();doSearch()\" value=\"");
      out.print(ServletResources.getString("GO", request));
      out.write("\" id=\"go\" alt=\"");
      out.print(ServletResources.getString("GO", request));
      out.write("\" title=\"");
      out.print(ServletResources.getString("GO", request));
      out.write("\">\n");
      out.write("\t\t\t\t\t<input type=\"hidden\" name=\"maxHits\" value=\"500\" >\n");
      out.write("\t\t\t\t</td>\n");
      out.write("\t\t\t\t<td nowrap>\n");
      out.write("\t\t\t\t\t<a id=\"scopeLabel\" href=\"javascript:openAdvanced();\" title=\"");
      out.print(ServletResources.getString("ScopeTooltip", request));
      out.write("\" alt=\"");
      out.print(ServletResources.getString("ScopeTooltip", request));
      out.write("\" onmouseover=\"window.status='");
      out.print(UrlUtil.JavaScriptEncode(ServletResources.getString("ScopeTooltip", request)));
      out.write("'; return true;\" onmouseout=\"window.status='';\">");
      out.print(ServletResources.getLabel("Scope", request));
      out.write("</a>\n");
      out.write("\t\t\t\t</td>\n");
      out.write("\t\t\t\t<td nowrap>\n");
      out.write("\t\t\t\t\t<input type=\"hidden\" name=\"workingSet\" value='");
      out.print(UrlUtil.htmlEncode(data.getScope()));
      out.write("'>\n");
      out.write("\t\t\t\t\t<div id=\"scope\" >");
      out.print(UrlUtil.htmlEncode(data.getScope()));
      out.write("</div>\n");
      out.write("\t\t\t\t</td>\n");
      out.write("\t\t\t</tr>\n");
      out.write("\n");
      out.write("\t\t</table>\n");
      out.write("\t</div>\n");
      out.write("\t</form>\t\t\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("</html>\n");
      out.write("\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #10
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<link type=\"text/css\" rel=\"stylesheet\"\r\n");
      out.write("\thref=\"");
      out.print(request.getContextPath());
      out.write("/css/dep/deplist.css\">\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("<title>");
      if (_jspx_meth_decorator_005ftitle_005f0(_jspx_page_context)) return;
      out.write("</title>\r\n");
      if (_jspx_meth_decorator_005fhead_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write("\r\n");
      out.write("<!-- 用户登陆的情况下 -->\r\n");
      //  s:if
      org.apache.struts2.views.jsp.IfTag _jspx_th_s_005fif_005f0 =
          (org.apache.struts2.views.jsp.IfTag)
              _005fjspx_005ftagPool_005fs_005fif_0026_005ftest.get(
                  org.apache.struts2.views.jsp.IfTag.class);
      _jspx_th_s_005fif_005f0.setPageContext(_jspx_page_context);
      _jspx_th_s_005fif_005f0.setParent(null);
      // /WEB-INF/decorator/basic.jsp(17,0) name = test type = java.lang.String reqTime = false
      // required = true fragment = false deferredValue = false expectedTypeName = null
      // deferredMethod = false methodSignature = null
      _jspx_th_s_005fif_005f0.setTest("#session.loginUser != null");
      int _jspx_eval_s_005fif_005f0 = _jspx_th_s_005fif_005f0.doStartTag();
      if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.pushBody();
          _jspx_th_s_005fif_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
          _jspx_th_s_005fif_005f0.doInitBody();
        }
        do {
          out.write("\r\n");
          out.write("\t欢迎[");
          out.write(
              (java.lang.String)
                  org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
                      "${session.loginUser.nickname}",
                      java.lang.String.class,
                      (PageContext) _jspx_page_context,
                      null,
                      false));
          out.write("]登录系统,你可以:\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/dep/dep_addInput\">添加部门</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/user/user_addInput\">添加用户</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/user/user_updateInput?user.id=");
          out.write(
              (java.lang.String)
                  org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
                      "${session.loginUser.id}",
                      java.lang.String.class,
                      (PageContext) _jspx_page_context,
                      null,
                      false));
          out.write("\">修改个人信息</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/msg/msg_addInput\">新建私信</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/msg/msg_listRevMsg\">查看收件箱</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/msg/msg_listSendedMsg\">查看发件箱</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/doc/doc_addInput\">新建公文</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/doc/doc_listRevDoc\">查看收到公文</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/doc/doc_listSendedDoc\">查看已发公文</a>\r\n");
          out.write("\t<a href=\"");
          out.print(request.getContextPath());
          out.write("/logout\">退出登录</a>\r\n");
          int evalDoAfterBody = _jspx_th_s_005fif_005f0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
        if (_jspx_eval_s_005fif_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.popBody();
        }
      }
      if (_jspx_th_s_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _005fjspx_005ftagPool_005fs_005fif_0026_005ftest.reuse(_jspx_th_s_005fif_005f0);
        return;
      }
      _005fjspx_005ftagPool_005fs_005fif_0026_005ftest.reuse(_jspx_th_s_005fif_005f0);
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<hr>\r\n");
      out.write("<h1 align=\"center\">");
      if (_jspx_meth_decorator_005ftitle_005f1(_jspx_page_context)) return;
      out.write("</h1>\r\n");
      if (_jspx_meth_decorator_005fbody_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("<hr>\r\n");
      out.write("</body>\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext =
          _jspxFactory.getPageContext(this, request, response, "error.jsp", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n\r\n\r\n\r\n\r\n");

      PresencePlugin plugin =
          (PresencePlugin) XMPPServer.getInstance().getPluginManager().getPlugin("presence");

      // Get parameters
      boolean save = request.getParameter("save") != null;
      boolean success = request.getParameter("success") != null;
      boolean presencePublic = ParamUtils.getBooleanParameter(request, "presencePublic");
      String unavailableStatus =
          ParamUtils.getParameter(request, "presenceUnavailableStatus", false);
      if (unavailableStatus == null) {
        unavailableStatus = plugin.getUnavailableStatus();
      }

      // Handle a save
      if (save) {
        plugin.setPresencePublic(presencePublic);
        plugin.setUnavailableStatus(unavailableStatus);
        response.sendRedirect("presence-service.jsp?success=true");
        return;
      }

      presencePublic = plugin.isPresencePublic();

      out.write(
          "\r\n\r\n<html>\r\n    <head>\r\n        <title>Presence Service</title>\r\n        <meta name=\"pageID\" content=\"presence-service\"/>\r\n    </head>\r\n    <body>\r\n\r\n<div class=\"information\">\r\n    ");

      String serverName = XMPPServer.getInstance().getServerInfo().getXMPPDomain();
      int port = JiveGlobals.getXMLProperty("adminConsole.port", -1);
      int securePort = JiveGlobals.getXMLProperty("adminConsole.securePort", -1);
      boolean secureOnly = (port == -1);

      out.write("\r\n\r\n    Presence Service URL:<br>\r\n    <tt>");
      out.print(secureOnly ? "https" : "http");
      out.write(':');
      out.write('/');
      out.write('/');
      out.print(serverName);
      out.write(':');
      out.print(secureOnly ? securePort : port);
      out.write("/plugins/presence/status</tt>\r\n    <br><br>\r\n    Example:<br>\r\n    <tt>");
      out.print(secureOnly ? "https" : "http");
      out.write(':');
      out.write('/');
      out.write('/');
      out.print(serverName);
      out.write(':');
      out.print(secureOnly ? securePort : port);
      out.write("/plugins/presence/status?jid=admin@");
      out.print(serverName);
      out.write(
          "</tt>  \r\n\r\n\r\n</div>\r\n\r\n<p>\r\nUse the form below to configure user presence visibility. By default, user\r\npresence should only be visible to those users that are authorized.<br>\r\n</p>\r\n\r\n");
      if (success) {
        out.write(
            "\r\n\r\n    <div class=\"jive-success\">\r\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n    <tbody>\r\n        <tr><td class=\"jive-icon\"><img src=\"images/success-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"></td>\r\n        <td class=\"jive-icon-label\">\r\n            Presence service properties edited successfully.\r\n        </td></tr>\r\n    </tbody>\r\n    </table>\r\n    </div><br>\r\n");
      }
      out.write(
          "\r\n\r\n<form action=\"presence-service.jsp?save\" method=\"post\">\r\n\r\n<fieldset>\r\n    <legend>Presence visibility</legend>\r\n    <div>\r\n    <p>\r\n    For security reasons, users control which users are authorized to see their presence. However,\r\n    it is posible to configure the service so that anyone has access to all presence information.\r\n    Use this option with caution.\r\n    </p>\r\n    <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n    <tbody>\r\n        <tr>\r\n            <td width=\"1%\">\r\n            <input type=\"radio\" name=\"presencePublic\" value=\"true\" id=\"rb01\"\r\n             ");
      out.print(((presencePublic) ? "checked" : ""));
      out.write(
          ">\r\n            </td>\r\n            <td width=\"99%\">\r\n                <label for=\"rb01\"><b>Anyone</b> - Anyone may get presence information.</label>\r\n            </td>\r\n        </tr>\r\n        <tr>\r\n            <td width=\"1%\">\r\n            <input type=\"radio\" name=\"presencePublic\" value=\"false\" id=\"rb02\"\r\n             ");
      out.print(((!presencePublic) ? "checked" : ""));
      out.write(
          ">\r\n            </td>\r\n            <td width=\"99%\">\r\n                <label for=\"rb02\"><b>Subscribed</b> - Presence information is only visibile to authorized users.</label>\r\n            </td>\r\n        </tr>\r\n    </tbody>\r\n    </table>\r\n    </div>\r\n</fieldset>\r\n\r\n<br>\r\n    \r\n<fieldset>\r\n    <legend>Plain Text 'Unavailable' Status Message</legend>\r\n    <div>\r\n    <p>\r\n    In &quot;text&quot; mode the status message for unavailable users is &quot;Unavailable&quot;\r\n    by default. It is possible to change the unavailable status message by setting this property.\r\n    </p>\r\n    <p>\r\n        <input type=\"text\" name=\"presenceUnavailableStatus\" value=\"");
      out.print(unavailableStatus);
      out.write(
          "\">\r\n    </p>\r\n    </div>\r\n</fieldset>\r\n\r\n<br><br>\r\n\r\n<input type=\"submit\" value=\"Save Properties\">\r\n</form>\r\n\r\n</body>\r\n</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");

      response.setContentType("text/xml");

      int mapId = -1;

      TopologyMap map = (TopologyMap) request.getAttribute("map");

      String isRcad = "false";

      if (map == null) {
        String strMapId = request.getParameter("mapId");
        if (strMapId != null) {
          mapId = Integer.parseInt(request.getParameter("mapId"));
        }
      }
      if (map == null && mapId != 99999) {
        map = TopologyMap.getMapById(mapId);
      }
      if (map != null) {
        List centities = map.getCentityMaps();
        List connections = map.getConnections();
        List bgimages = map.getMapBgimages();

        if (WTAccountCredentials.current() == null) {
          System.out.println("NullPointerException: WTAccountCredentials.current() is null");
          return;
        }

        String user = WTAccountCredentials.current().getUserName();
        boolean admin = false;
        WTRole role = WTAccountCredentials.current().getMostPrivilegedRole();
        admin = role.isOrgAdmin() || role.isSiteAdmin();

        if (user == null) {

          out.write("<topology-map />");

          return;
        }
        boolean readOnly = !user.equals(map.getCreator());

        Integer groupId = map.getGroupId();
        String groupAttrs = "";
        if (groupId != null) {
          WTGroupManager groupMan = ManagersImpl.GroupManager;
          WTGroup group = (WTGroup) groupMan.getObject(groupId.intValue());
          groupMan.resolveReferences(group);
          groupAttrs =
              "groupName=\""
                  + URLEncoder.encode(group.getOrg().getName() + " - " + group.getName(), "UTF-8")
                  + "\" groupId=\""
                  + groupId.intValue()
                  + "\"";
        }

        isRcad = String.valueOf(map.isRca());

        out.write("\n\t");
        out.write("<topology-map mapId=\"");
        out.print(map.getMapId());
        out.write("\" name=\"");
        out.print(map.getName());
        out.write("\" mapTypeId=\"");
        out.print(map.getTypeId());
        out.write("\" \n\t zoomLevel=\"");
        out.print(map.getZoom());
        out.write("\" paneScrollX=\"");
        out.print(map.getScrollX());
        out.write("\" paneScrollY=\"");
        out.print(map.getScrollY());
        out.write("\"\n\t shared=\"");
        out.print(map.isShared());
        out.write("\" creator=\"");
        out.print(map.getCreator());
        out.write("\" iconSize=\"");
        out.print(map.getIconSize());
        out.write("\"\n\t labelsAlwaysOn=\"");
        out.print(map.isLabelsAlwaysOn());
        out.write("\" readOnly=\"");
        out.print(readOnly);
        out.write("\" ");
        out.print(groupAttrs);
        out.write(" admin=\"");
        out.print(admin);
        out.write("\" isRcad=\"");
        out.print(isRcad);
        out.write("\">\n\t\n\t\t");
        out.write("<entities>\n\t");

        for (Iterator it = centities.iterator(); it.hasNext(); ) {
          CentityMap centityMap = (CentityMap) it.next();
          StringBuffer hierarchyBuffer = new StringBuffer();
          if (centityMap.getType().equals("category")) {
            WTCategory cat =
                (WTCategory)
                    ManagersImpl.CategoryManager.getObject(
                        Integer.valueOf(centityMap.getIdForType()));
            List sectionList = ManagersImpl.CategoryManager.getAllParentSections(cat);

            for (Iterator sectionIt = sectionList.iterator(); sectionIt.hasNext(); ) {
              WTSection section = (WTSection) sectionIt.next();
              hierarchyBuffer.append(section.getName() + " / ");
            }
          }

          out.write("\n\t    ");
          out.write("<entity centityId=\"");
          out.print(centityMap.getCentityId());
          out.write("\" type=\"");
          out.print(centityMap.getType());
          out.write("\" id=\"");
          out.print(centityMap.getXmlId());
          out.write("\"\n\t     icon=\"");
          out.print(centityMap.getIcon());
          out.write("\" label=\"");
          out.print(centityMap.getLabel());
          out.write("\" hierarchy=\"");
          out.print(hierarchyBuffer.toString());
          out.write("\"\n\t      x=\"");
          out.print(centityMap.getXPlacement());
          out.write("\" y=\"");
          out.print(centityMap.getYPlacement());
          out.write("\"/>\n\t    ");
        }

        out.write("\n\t\t");
        out.write("</entities>\n\t\t");
        out.write("<connections>\n\t");

        for (Iterator it = connections.iterator(); it.hasNext(); ) {
          CentityConnection cc = (CentityConnection) it.next();
          String startType = null;
          String endType = null;
          int startId = -1;
          int endId = -1;
          if (cc.getParentNodeid() != null) {
            startType = "node";
            startId = cc.getParentNodeid();
          } else if (cc.getParentCategoryId() != null) {
            startType = "category";
            startId = cc.getParentCategoryId();
          }
          if (cc.getNodeid() != null) {
            endType = "node";
            endId = cc.getNodeid();
          } else if (cc.getCategoryId() != null) {
            endType = "category";
            endId = cc.getCategoryId();
          }

          out.write("\n\t\t\t");
          out.write("<connection startType=\"");
          out.print(startType);
          out.write("\" startId=\"");
          out.print(startId);
          out.write("\" endType=\"");
          out.print(endType);
          out.write("\" endId=\"");
          out.print(endId);
          out.write("\" />\n\t");
        }

        out.write("\n\t\t");
        out.write("</connections>\n\t\t");
        out.write("<bgimages>\n\t");

        for (Iterator it = bgimages.iterator(); it.hasNext(); ) {
          MapBgimage bgimage = (MapBgimage) it.next();

          out.write("\n\t\t\t\t");
          out.write("<bgimage mapBgimageId=\"");
          out.print(bgimage.getMapBgimageId());
          out.write("\" bgimageId=\"");
          out.print(bgimage.getBgimageId());
          out.write("\"\n\t\t\t\t creator=\"");
          out.print(bgimage.getCreator());
          out.write("\" src=\"");
          out.print(bgimage.getSrc());
          out.write("\" x=\"");
          out.print(bgimage.getXPlacement());
          out.write("\"\n\t\t\t\t  y=\"");
          out.print(bgimage.getYPlacement());
          out.write("\" zindex=\"");
          out.print(bgimage.getZIndex());
          out.write("\" xscale=\"");
          out.print(bgimage.getXScale());
          out.write("\"\n\t\t\t\t   yscale=\"");
          out.print(bgimage.getYScale());
          out.write("\" />\n\t");
        }

        out.write("\n\t\t");
        out.write("</bgimages>\n\t\t\n\t");
        out.write("</topology-map>\n");

      } else {
        out.write("\n");
        out.write(
            "<topology-map mapId=\"99999\" name=\"Topology Sample\" zoomLevel=\"10\" paneScrollX=\"0\" paneScrollY=\"0\" shared=\"true\" creator=\"admin\" iconSize=\"32\" labelsAlwaysOn=\"true\" type=\"topology\">\n\t");
        out.write("<entities>\n\t\t");
        out.write(
            "<entity centityId=\"-90\" type=\"node\" id=\"node_603\" icon=\"OS_Win2003.swf\" label=\"CARROT\" x=\"300\" y=\"200\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-91\" type=\"node\" id=\"node_653\" icon=\"OS_Win2000.swf\" label=\"RAISIN\" x=\"200\" y=\"200\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-92\" type=\"node\" id=\"node_615\" icon=\"OS_Win2003.swf\" label=\"10.100.100.88\" x=\"300\" y=\"100\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-93\" type=\"node\" id=\"node_616\" icon=\"OS_WinXP.swf\" label=\"10.100.100.241\" x=\"100\" y=\"100\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-94\" type=\"node\" id=\"node_613\" icon=\"OS_FoundryIronWare.swf\" label=\"Foundry\" x=\"200\" y=\"125\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-95\" type=\"node\" id=\"node_656\" icon=\"OS_WinXP.swf\" label=\"10.100.100.239\" x=\"225\" y=\"70\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-96\" type=\"node\" id=\"node_610\" icon=\"OS_CiscoIOS.swf\" label=\"Cittio-2621\" x=\"125\" y=\"150\"/>\n\t\t");
        out.write(
            "<entity centityId=\"-97\" type=\"node\" id=\"node_614\" icon=\"OS_Linux.swf\" label=\"Mango\" x=\"100\" y=\"200\"/>\n\n\t");
        out.write("</entities>\n\t");
        out.write("<connections>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"603\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"653\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"615\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"616\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"656\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"610\" endType=\"node\" endId=\"613\"/>\n\t\t");
        out.write(
            "<connection startType=\"node\" startId=\"614\" endType=\"node\" endId=\"610\"/>\n\t");
        out.write("</connections>\n\t");
        out.write("<bgimages />\n");
        out.write("</topology-map>\n");
      }

      out.write("\n\n\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n\n\n\n\n\n\n");

      boolean bookmarkCreated = request.getParameter("bookmarkCreated") != null;

      boolean delete = request.getParameter("delete") != null;
      final Collection<Bookmark> bookmarks = BookmarkManager.getBookmarks();

      out.write("\n\n<html>\n<head>\n    <title>");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/style/global.css\">\n    <meta name=\"pageID\" content=\"groupchat-bookmarks\"/>\n    <script src=\"/js/prototype.js\" type=\"text/javascript\"></script>\n    <script src=\"/js/scriptaculous.js\" type=\"text/javascript\"></script>\n    <style type=\"text/css\">\n        .div-border {\n            border: 1px solid #CCCCCC;\n            -moz-border-radius: 3px;\n        }\n    </style>\n    <style type=\"text/css\">\n        @import \"style/style.css\";\n    </style>\n</head>\n\n<body>\n\n<p>\n    ");
      if (_jspx_meth_fmt_message_1(_jspx_page_context)) return;
      out.write("\n</p>\n\n");
      if (bookmarkCreated) {
        out.write("\n<div class=\"success\">\n   ");
        if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
        out.write("\n</div>\n");
      }
      out.write('\n');
      out.write('\n');
      if (delete) {
        out.write("\n<div class=\"success\">\n     ");
        if (_jspx_meth_fmt_message_3(_jspx_page_context)) return;
        out.write("\n</div>\n");
      }
      out.write(
          "\n\n<br/>\n\n    <div class=\"div-border\" style=\"padding: 12px; width: 95%;\">\n        <table class=\"jive-table\" cellspacing=\"0\" width=\"100%\">\n            <th>");
      if (_jspx_meth_fmt_message_4(_jspx_page_context)) return;
      out.write("</th><th>");
      if (_jspx_meth_fmt_message_5(_jspx_page_context)) return;
      out.write("</th><th>");
      if (_jspx_meth_fmt_message_6(_jspx_page_context)) return;
      out.write("</th><th>");
      if (_jspx_meth_fmt_message_7(_jspx_page_context)) return;
      out.write("</th><th>");
      if (_jspx_meth_fmt_message_8(_jspx_page_context)) return;
      out.write("</th><th>");
      if (_jspx_meth_fmt_message_9(_jspx_page_context)) return;
      out.write("</th>\n            ");

      boolean hasBookmarks = false;
      for (Bookmark bookmark : bookmarks) {
        String users = "";
        String groups = "";
        if (bookmark.getType() != Bookmark.Type.group_chat) {
          continue;
        } else {
          hasBookmarks = true;
          if (bookmark.isGlobalBookmark()) {
            users = "All";
            groups = "All";
          } else {
            users =
                bookmark.getUsers().size()
                    + " "
                    + LocaleUtils.getLocalizedString("group.chat.bookmark.users", "clientcontrol");
            groups =
                bookmark.getGroups().size()
                    + " "
                    + LocaleUtils.getLocalizedString("group.chat.bookmark.groups", "clientcontrol");
          }
        }

        out.write("\n            <tr style=\"border-left: none;\">\n                <td>");
        out.print(bookmark.getName());
        out.write("</td>\n                <td>");
        out.print(bookmark.getValue());
        out.write("</td>\n                <td>");
        out.print(users);
        out.write("</td>\n                <td>");
        out.print(groups);
        out.write("</td>\n                <td>");
        out.print(
            bookmark.getProperty("autojoin") != null ? "<img src='/images/check.gif'>" : "&nbsp;");
        out.write(
            "</td>\n                <td>\n                    <a href=\"create-bookmark.jsp?edit=true&bookmarkID=");
        out.print(bookmark.getBookmarkID());
        out.write(
            "\"><img src=\"/images/edit-16x16.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"Edit Bookmark\"/></a>\n                    <a href=\"confirm-bookmark-delete.jsp?bookmarkID=");
        out.print(bookmark.getBookmarkID());
        out.write(
            "\"><img src=\"/images/delete-16x16.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"Delete Bookmark\"/></a>\n\n                </td>\n            </tr>\n            ");
      }
      out.write("\n\n            ");
      if (!hasBookmarks) {
        out.write("\n            <tr>\n                <td colspan=\"6\" align=\"center\">");
        if (_jspx_meth_fmt_message_10(_jspx_page_context)) return;
        out.write("</td>\n            </tr>\n            ");
      }
      out.write(
          "\n            <tr>\n                <td colspan=\"6\">\n                    <a href=\"create-bookmark.jsp?type=group_chat\"><img src=\"/images/add-16x16.gif\" border=\"0\" align=\"texttop\" style=\"margin-right: 3px;\"/>");
      if (_jspx_meth_fmt_message_11(_jspx_page_context)) return;
      out.write(
          "</a>\n                </td>\n            </tr>\n        </table>\n    </div>\n\n</body>\n</html>\n\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #14
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html>\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head><title>Calculator</title></head>\r\n");
      out.write("<body>\r\n");
      out.write("    ");

      String plasA = request.getParameter("plusA");
      String plasB = request.getParameter("plusB");
      String multiplyA = request.getParameter("multiplyA");
      String multiplyB = request.getParameter("multiplyB");

      if (plasA != null && !plasA.isEmpty() && !plasB.isEmpty()) {
        try {
          int result = Integer.parseInt(plasA) + Integer.parseInt(plasB);
          request.setAttribute("plusRequest", result);
          request.setAttribute("plusA", plasA);
          request.setAttribute("plusB", plasB);
        } catch (Exception e) {

        }
      } else {
        request.setAttribute("plusRequest", "");
        request.setAttribute("plusA", plasA);
        request.setAttribute("plusB", plasB);
      }
      if (multiplyA != null && !multiplyA.isEmpty() && !multiplyB.isEmpty()) {
        try {
          int result = Integer.parseInt(multiplyA) * Integer.parseInt(multiplyB);
          request.setAttribute("mutilplyResult", result);
          request.setAttribute("multiplyA", multiplyA);
          request.setAttribute("multiplyB", multiplyB);
          // out.printf("<br/><span>%s*%s=%d</span>",multiplyA,multiplyB,result);
        } catch (Exception e) {
          out.print(e.getMessage());
        }

      } else {
        request.setAttribute("mutilplyResult", "");
        request.setAttribute("multiplyA", multiplyA);
        request.setAttribute("multiplyB", multiplyB);
      }

      out.write("\r\n");
      out.write(" <form  method=\"post\" id=\"myForm\">\r\n");
      out.write("        <div class=\"plus\">\r\n");
      out.write("            <p><input type=\"text\"  name=\"plusA\" value=\"");
      out.print(request.getAttribute("plusA") == null ? "" : request.getAttribute("plusA"));
      out.write("\" /><span>+</span>\r\n");
      out.write("                <input type=\"text\" value=\"");
      out.print(request.getAttribute("plusB") == null ? "" : request.getAttribute("plusB"));
      out.write("\" name=\"plusB\">\r\n");
      out.write("                <span>=</span><input type=\"text\" id=\"plusResult\" value=\"");
      out.print(request.getAttribute("plusRequest"));
      out.write("\"/>\r\n");
      out.write("                </p>\r\n");
      out.write("        </div>\r\n");
      out.write("         <div class=\"multiply\">\r\n");
      out.write("            <p><input type=\"text\" value=\"");
      out.print(request.getAttribute("multiplyA") == null ? "" : request.getAttribute("multiplyA"));
      out.write("\" name=\"multiplyA\"><span>*</span>\r\n");
      out.write("                <input type=\"text\" value=\"");
      out.print(request.getAttribute("multiplyB") == null ? "" : request.getAttribute("multiplyB"));
      out.write("\" name=\"multiplyB\">\r\n");
      out.write(
          "                <span>=</span><input type=\"text\" id=\"multiplyResult\" value=\"");
      out.print(request.getAttribute("mutilplyResult"));
      out.write("\" />\r\n");
      out.write("            </p>\r\n");
      out.write("        </div>\r\n");
      out.write("        <div><input type=\"submit\" value=\"Submit\" id=\"submit\"/></div>\r\n");
      out.write("        <div id=\"result\"></div>\r\n");
      out.write("        </form>\r\n");
      out.write("\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\r');
      out.write('\n');
      try {
        out.write("\r\n\r\n ");

        String wgID = request.getParameter("wgID");
        final WorkgroupManager workgroupManager = WorkgroupManager.getInstance();
        Workgroup workgroup = workgroupManager.getWorkgroup(new JID(wgID));

        OfflineSettingsManager offlineManager = new OfflineSettingsManager();
        String redirectValue = request.getParameter("redirectToPage");
        String statusMessage = "";

        OfflineSettings offlineSettings = null;

        boolean emailConfigured = false;

        String property = JiveGlobals.getProperty("mail.configured");
        if (ModelUtil.hasLength(property)) {
          emailConfigured = true;
        }

        boolean delete = request.getParameter("delete") != null;
        boolean save = request.getParameter("save") != null && !delete;

        if (save) {
          String emailAddress = request.getParameter("email");
          String subject = request.getParameter("subject");
          String header = request.getParameter("headerField");
          offlineSettings =
              offlineManager.saveOfflineSettings(
                  workgroup, redirectValue, emailAddress, subject, header);
          if (offlineSettings != null) {
            statusMessage = "Offline settings have been saved.";
          }
        } else if (delete) {
          statusMessage = "Offline settings have been deleted.";
          offlineSettings =
              offlineManager.saveOfflineSettings(workgroup, redirectValue, "", "", "");
        } else {
          try {
            offlineSettings = offlineManager.getOfflineSettings(workgroup);
          } catch (OfflineSettingsNotFound offlineSettingsNotFound) {
            offlineSettings = new OfflineSettings();
          }
        }

        out.write("\r\n<html>\r\n    <head>\r\n        <title>");
        out.print("Offline Settings for " + wgID);
        out.write(
            "</title>\r\n        <meta name=\"subPageID\" content=\"workgroup-offline\"/>\r\n        <meta name=\"extraParams\" content=\"");
        out.print("wgID=" + wgID);
        out.write(
            "\"/>\r\n        <!--<meta name=\"helpPage\" content=\"set_an_offline_policy_for_a_workgroup.html\"/>-->\r\n\r\n        <script>\r\n        function saveOfflineSettings(){\r\n             var todo = document.offline.todo;\r\n             if(todo[0].checked){\r\n                 var url = document.offline.redirectToPage.value;\r\n                 if(!Jtrim(url)){\r\n                   alert(\"Please specify the URL to forward to.\");\r\n                   document.offline.redirectToPage.focus();\r\n                   return;\r\n                 }\r\n                 document.offline.email.value = \"\";\r\n                 document.offline.subject.value = \"\";\r\n                 document.offline.headerField.value = \"\";\r\n\r\n                 document.offline.submit();\r\n             }\r\n             else if(todo[1].checked){\r\n               var email = document.offline.email.value;\r\n               var subject = document.offline.subject.value;\r\n               var message = document.offline.headerField.value;\r\n               document.offline.redirectToPage.value = '';\r\n");
        out.write(
            "\r\n               if(!Jtrim(email) || !Jtrim(subject) || !Jtrim(message)){\r\n                 alert(\"All fields are required.\");\r\n                 return;\r\n               }\r\n                document.offline.submit();\r\n             }\r\n        }\r\n\r\n\r\n\r\n         function Jtrim(st) {\r\n             var len = st.length;\r\n             var begin = 0, end = len - 1;\r\n             while (st.charAt(begin) == \" \" && begin < len) {\r\n                 begin++;\r\n             }\r\n             while (st.charAt(end) == \" \" && end > begin) {\r\n                 end--;\r\n             }\r\n             return st.substring(begin, end + 1);\r\n         }\r\n        </script>\r\n    </head>\r\n    <body>\r\n    Specify action to take when this workgroup has no available agents to take incoming chat requests.\r\n    ");
        if (statusMessage != null && !statusMessage.equals("")) {
          out.write("\r\n    <div class=\"success\">\r\n        ");
          out.print(statusMessage);
          out.write("\r\n    </div>\r\n    ");
        }
        out.write("\r\n\r\n      ");
        if (!emailConfigured) {
          out.write(
              "\r\n            <div class=\"error\">\r\n                Email form will not be displayed until you configure your <a href=\"../../system-email.jsp\">email settings</a>.\r\n            </div>\r\n    ");
        }
        out.write("\r\n\r\n    <div id=\"offline_message\">");
        out.print(statusMessage);
        out.write(
            "</div>\r\n    <p/>\r\n    <form action=\"workgroup-offline.jsp\" method=\"get\" name=\"offline\">\r\n    <input type=\"hidden\" name=\"wgID\" value=\"");
        out.print(wgID);
        out.write(
            "\" />\r\n    <div>\r\n        <div class=\"jive-contentBoxHeader\">\r\n        Offline Workgroup Action\r\n        </div>\r\n        <table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" border=\"0\" class=\"jive-contentBox\">\r\n                <tr valign=\"top\">\r\n                ");
        String checked = offlineSettings.redirects() ? "checked" : "";
        out.write(
            "\r\n                            <td width=\"1%\">\r\n                                <input type=\"radio\" name=\"todo\" value=\"redirectToPage\" ");
        out.print(checked);
        out.write(
            " />\r\n                            </td>\r\n                            <td nowrap><b>Redirect To Web Page</b>\r\n                               </td>\r\n                            <td class=\"c2\">\r\n                                <input type=\"text\" name=\"redirectToPage\" size=\"40\" value=\"");
        out.print(offlineSettings.getRedirectURL());
        out.write(
            "\" /><br/>\r\n                                 <span class=\"jive-description\">e.g. http://www.jivesoftware.com/contact.html</span>\r\n                            </td>\r\n                </tr>\r\n                <tr>\r\n                    <td nowrap width=\"1%\">\r\n                         <input type=\"radio\" name=\"todo\" value=\"showEmailPage\" ");
        out.print(!offlineSettings.redirects() ? "checked" : "");
        out.write(
            "/>\r\n                         <td><b>Display Email Form</b></td>\r\n                     </td>\r\n                     <td>&nbsp;</td>\r\n                </tr>\r\n                <!-- Email Address -->\r\n                <tr valign=\"top\">\r\n                    <td>&nbsp;</td>\r\n                    <td>Email Address:</td>\r\n                    <td>\r\n                        <input type=\"text\" size=\"40\" name=\"email\" value=\"");
        out.print(offlineSettings.getEmailAddress());
        out.write(
            "\" /><br/>\r\n                        <span class=\"jive-description\">Email address to send all offline messages to.</span>\r\n                    </td>\r\n                </tr>\r\n                <!-- End of Email Address -->\r\n                <!-- Subject Line -->\r\n                 <tr valign=\"top\">\r\n                    <td>&nbsp;</td>\r\n                    <td>Subject:</td>\r\n                    <td>\r\n                        <input type=\"text\" size=\"40\" name=\"subject\" value=\"");
        out.print(offlineSettings.getSubject());
        out.write(
            "\"/><br/>\r\n                        <span class=\"jive-description\">The subject of all offline email messages.</span>\r\n                    </td>\r\n                </tr>\r\n                <!--  End Of Subject Line -->\r\n                <tr valign=\"top\">\r\n                     <td>&nbsp;</td>\r\n                    <td>Offline Text:</td>\r\n                    <td>\r\n                        <textarea name=\"headerField\" cols=\"40\" rows=\"5\">");
        out.print(offlineSettings.getOfflineText());
        out.write(
            "</textarea><br/>\r\n                        <span class=\"jive-description\">Text to display to the user in the email form.</span>\r\n                    </td>\r\n                </tr>\r\n                    <input type=\"hidden\" name=\"save\" value=\"save\">\r\n                 <tr>\r\n                </tr>\r\n            ");
        out.write(
            "\r\n            </table>\r\n            <table><tr>\r\n                 <td colspan=\"1\"> <input type=\"button\" name=\"save\" value=\"Save Changes\" onclick=\"return saveOfflineSettings();\" /></td>\r\n                <td colspan=\"1\"> <input type=\"submit\" name=\"delete\" value=\"Delete Changes\" /></td>\r\n            </tr></table>\r\n       </div>\r\n    </form>\r\n\r\n</body>\r\n</html>\r\n\r\n");
      } catch (Exception ex) {
        ex.printStackTrace();
      }
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      ArrayList<listeningFormBean> list = (ArrayList) session.getAttribute("listening");
      String tensu = (String) session.getAttribute("TEN");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html>\r\n");
      out.write("<html lang=\"ja\">\r\n");
      out.write("<script type=\"text/javascript\" src=\"js/listeningReturn.js\"></script>\r\n");
      out.write("<script type=\"text/css\" src=\"css/Listening.css\"></script>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("<title>Lesson1</title>\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("\r\n");
      out.write("\t\tp.line {color:black; background:yellowgreen;}\r\n");
      out.write("\r\n");
      out.write("</style>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<h3>Lesson1</h3>\r\n");
      out.write("<center>\r\n");
      out.write("<h2>Lesson1 回答および解説</h2>\r\n");
      out.write("\r\n");
      out.write("<input type=\"text\" value=\"");
      out.print(tensu);
      out.write("\" size=\"4\">点\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</center>\r\n");
      out.write("<div id=Q>\r\n");
      out.write("\r\n");
      for (int i = 0; i < list.size(); i++) {
        listeningFormBean lis = list.get(i);
        out.write("\r\n");
        out.write("\r\n");
        out.write("<p>");
        out.print(lis.getQuestionText());
        out.write("</p>\r\n");
        out.write("\r\n");
        out.write("<br>\r\n");
        out.write("\r\n");
        out.write("<br><br>\r\n");
        out.write("<center>\r\n");
        out.write("<!--<p class=\"line\">-->\r\n");
        out.write("<audio id=\"audio\" controls width=\"320\" height=\"240\">\r\n");
        out.write("<source src=\"");
        out.print(lis.getMusicName());
        out.write("\">\r\n");
        out.write("</audio><br>\r\n");
        out.write("\r\n");
        out.write("<input type=\"text\" ><br>\r\n");
        out.write("答え”");
        out.print(lis.getAnswer());
        out.write("”<br>\r\n");
        out.print(lis.getAnswerText());
        out.write("\r\n");
        out.write("\r\n");
        out.write("</center>\r\n");
        out.write("</div>\r\n");
      }
      out.write("\r\n");
      out.write("\r\n");
      out.write("<center>\r\n");
      out.write("<form action=\"/eLearning/ListeningNextServlet\">\r\n");
      out.write("<BUTTON>リトライ!</BUTTON>\r\n");
      out.write("</form>\r\n");
      out.write("\r\n");
      out.write("<form action=\"/eLearning/ListeningServlet\" id=\"EnglishForm\">\r\n");
      out.write("<BUTTON id=\"Lbtn\">Listening目次へ</BUTTON>\r\n");
      out.write("<input type=\"hidden\" id=\"kamokuID\" name=\"kamokuID\"></input>\r\n");
      out.write("\r\n");
      out.write("</form>\r\n");
      out.write("\r\n");
      out.write("<BR>\r\n");
      out.write("\r\n");
      out.write("</center>\r\n");
      out.write("</body>\r\n");
      out.write("\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<!--%@ page errorPage=\"/error.jsp\" %-->\n");

      response.setHeader("Pragma", "no-cache"); // HTTP 1.0
      response.setDateHeader("Expires", 0);
      response.setHeader("Cache-Control", "no-cache"); // HTTP 1.1

      String _adminid = "";
      String _adminname = "";
      String _admintype = "";
      String _admingroup = "";
      String _approval = "";
      String _adminclass = "";
      String _adminmail = "";

      try {

        _adminid = (String) session.getAttribute("adminid");

        if (_adminid == null || _adminid.length() == 0 || _adminid.equals("null")) {
          response.sendRedirect("/admin/login_first.html");
          return;
        }

        _adminname = (String) session.getAttribute("adminname");
        _admintype = (String) session.getAttribute("admintype");
        _admingroup = (String) session.getAttribute("admingroup");
        _approval = (String) session.getAttribute("approval");
        _adminclass = (String) session.getAttribute("adminclass");
        _adminmail = (String) session.getAttribute("admin_email");
        // session.setMaxInactiveInterval(60*60);

      } catch (Exception e) {
        response.sendRedirect("/admin/login_first.html");
        return;
      }

      out.write('\n');
      out.write('\n');
      out.write('\n');

      String password = request.getParameter("password");
      String fromURL = request.getParameter("fromURL");
      String oldPassword = "";

      String sql = "";
      int iCnt = 0;
      boolean isSucceeded = false;
      String strMsg = "";
      Connection conn = null;
      MatrixDataSet matrix = null;
      DataProcess dataProcess = null;
      PreparedStatement pstmt = null;

      String targetUrl = "";

      try {

        if (password.equals("1111")) {
          throw new UserDefinedException(
              "The new password is not acceptable. Change your password.");
        }

        Context ic = new InitialContext();
        DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/scm");
        conn = ds.getConnection();
        matrix = new dbconn.MatrixDataSet();
        dataProcess = new DataProcess();

        sql =
            " select  password " + " from    admin_01t " + " where   adminid = '" + _adminid + "' ";

        iCnt = dataProcess.RetrieveData(sql, matrix, conn);

        if (iCnt > 0) {
          oldPassword = matrix.getRowData(0).getData(0);
        } else {
          throw new UserDefinedException("Can't find User Information.");
        }

        if (password.equals(oldPassword)) {
          throw new UserDefinedException(
              "The new password is not acceptable. Change your password.");
        }

        // update ó¸®...
        int idx = 0;
        conn.setAutoCommit(false);

        sql =
            " update  admin_01t "
                + " set     password = ?, pw_date = sysdate() "
                + " where   adminid = ? ";

        pstmt = conn.prepareStatement(sql);
        pstmt.setString(++idx, password);
        pstmt.setString(++idx, _adminid);

        iCnt = pstmt.executeUpdate();

        if (iCnt != 1) {
          throw new UserDefinedException("Password update failed.");
        }

        conn.commit();
        isSucceeded = true;

      } catch (UserDefinedException ue) {
        try {
          conn.rollback();
        } catch (Exception ex) {
        }

        strMsg = ue.getMessage();
      } catch (Exception e) {
        try {
          conn.rollback();
        } catch (Exception ex) {
        }

        System.out.println("Exception /admin/resetAdminPasswd : " + e.getMessage());
        throw e;
      } finally {
        if (pstmt != null) {
          try {
            pstmt.close();
          } catch (Exception e) {
          }
        }

        if (conn != null) {
          try {
            conn.setAutoCommit(true);
          } catch (Exception e) {
          }
          conn.close();
        }
      }

      // °á°ú ¸Þ½ÃÁö ó¸®
      if (isSucceeded) {
        // where to go?
        if (fromURL.equals("menu")) {
          targetUrl = "";
        } else {
          targetUrl = "/admin/index2.jsp";
        }
        strMsg = "The data are successfully processed.";
      } else {
        strMsg = "The operation failed.\\n" + strMsg;
        targetUrl = "/admin/resetAdminPasswdForm.jsp";
      }

      out.write("\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<title></title>\n");
      out.write("<link href=\"/common/css/style.css\" rel=\"stylesheet\" type=\"text/css\">\n");
      out.write("</head>\n");
      out.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>\n");
      out.write("<form name=\"form1\" method=\"post\" action=\"");
      out.print(targetUrl);
      out.write("\">\n");
      out.write("<input type='hidden' name='fromURL' value='");
      out.print(fromURL);
      out.write("'>\n");
      out.write("</form>\n");
      out.write("<script language=\"javascript\">\n");
      if (targetUrl.length() > 0) {
        out.write("\n");
        out.write("  alert('");
        out.print(strMsg);
        out.write("');\n");
        out.write("  document.form1.submit();\n");
      }
      out.write("\n");
      out.write("</script>\n");
      out.write("<table width='840' border='0' cellspacing='0' cellpadding='0'><tr><td>\n");
      out.write("\n");
      out.write("<table width='99%' border='0' cellspacing='0' cellpadding='0'>\n");
      out.write("<tr>\n");
      out.write("  <td height='15' colspan='2'></td>\n");
      out.write("</tr>\n");
      out.write("<tr>\n");
      out.write("  <td width='3%'><img src='/img/title_icon.gif'></td>\n");
      out.write("  <td width='*' class='left_title'>Password Change</td>\n");
      out.write("</tr>\n");
      out.write("<tr>\n");
      out.write("  <td width='100%' height='2' colspan='2'><hr width='100%'></td>\n");
      out.write("</tr>\n");
      out.write("<tr>\n");
      out.write("  <td height='10' colspan='2'></td>\n");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("\n");
      out.write("<table width='90%' border='0' cellspacing='0' cellpadding='0' align='center'>\n");
      out.write("<tr>\n");
      out.write("  <td width='100%' align='center'><img border=\"0\" src=\"/img/pass.jpg\">\n");
      out.write("    <br><br>\n");
      out.write("    <b>The Password has been changed successfully.</b></td>\n");
      out.write("</tr>\n");
      out.write("</table>\n");

      out.println(CopyRightLogo());

      out.write("\n");
      out.write("</tr></td></table>\n");
      out.write("</body>\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #18
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html;charset=GBK");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("  <head>\r\n");
      out.write("    <base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("    \r\n");
      out.write("    <title>实收新增</title>\r\n");
      out.write("    \r\n");
      out.write("\t\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(request.getContextPath());
      out.write("/ecside/css/ecside_style.css\" />\r\n");
      out.write("\t\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/ecside/js/prototype_mini.js\"></script>\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/ecside/js/ecside_msg_utf8_cn.js\"></script>\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/ecside/js/ecside.js\"></script>\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/themes/default/easyui.css\">\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/themes/icon.css\">\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/demo/demo.css\">\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/jquery-1.8.0.min.js\"></script>\r\n");
      out.write("\t<script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write("/jquery-easyui-1.3.1/jquery.easyui.min.js\"></script>\r\n");
      out.write("\t\r\n");
      out.write("\r\n");
      out.write("  </head>\r\n");
      out.write("  <script type=\"text/javascript\">\r\n");
      out.write("  \t\r\n");
      out.write("  \t\r\n");
      out.write("  \t\r\n");
      out.write("  \tfunction initForm(){\r\n");
      out.write("  \t\tvar rs = $('#result').attr('value');\r\n");
      out.write("  \t\t//alert(rs);\r\n");
      out.write("  \t\tif(rs=='1'){\r\n");
      out.write("  \t\t\t$.messager.alert(\"提示\",\"保存成功!\");\r\n");
      out.write("  \t\t\treturn;\r\n");
      out.write("  \t\t}else if(rs=='0'){\r\n");
      out.write("  \t\t\t$.messager.alert(\"提示\",\"保存失败!\");\r\n");
      out.write("  \t\t}else if(rs=='-1'){\r\n");
      out.write("  \t\t\t$.messager.alert(\"提示\",\"Excel解析失败!\");\r\n");
      out.write("  \t\t}\r\n");
      out.write("  \t}\r\n");
      out.write("  \tfunction importRcved(){\r\n");
      out.write("  \t\tvar fileName = $('#file').attr('value');\r\n");
      out.write("  \t\tif(fileName==null || fileName==''){\r\n");
      out.write("  \t\t\talert('请选择导入文件');\r\n");
      out.write("  \t\t\treturn;\r\n");
      out.write("  \t\t}\r\n");
      out.write("  \t\tdocument.forms[0].submit();\r\n");
      out.write("  \t}\r\n");
      out.write("  \tfunction confirm(){\r\n");
      out.write("  \t\tvar arrayTr = $('#ecTable_table tr');\r\n");
      out.write("  \t\tif(arrayTr.length<2){\r\n");
      out.write("  \t\t\talert('界面没有需要导入的记录');\r\n");
      out.write("  \t\t\treturn;\r\n");
      out.write("  \t\t}\r\n");
      out.write("  \t\tdocument.forms[1].submit();\r\n");
      out.write("  \t}\r\n");
      out.write("  </script>\r\n");
      out.write("  \r\n");
      out.write("  <body onload=\"initForm()\" >\r\n");
      out.write("    <input type=\"hidden\" id=\"result\" value=\"");
      out.print(request.getAttribute("result"));
      out.write("\">\r\n");
      out.write("    <table width=\"100%\"><tr>\r\n");
      out.write("    <td width=\"300px\">\r\n");
      out.write("    ");
      if (_jspx_meth_s_005fform_005f0(_jspx_page_context)) return;
      out.write("\t\r\n");
      out.write("    </td>\r\n");
      out.write("    <td align=\"left\">\r\n");
      out.write("    ");
      if (_jspx_meth_s_005fform_005f1(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("   \t</td> \t\r\n");
      out.write("   \t</tr> \r\n");
      out.write("   \t</table>\r\n");
      out.write("   \t  \r\n");
      out.write("   \t  \r\n");
      out.write("   \t  ");
      if (_jspx_meth_ec_005ftable_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("   \t \r\n");
      out.write("  </body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #19
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\r');
      out.write('\n');

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write('\r');
      out.write('\n');
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("\t<head>\r\n");
      out.write("\t\t<base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("\r\n");
      out.write("\t\t<title>My JSP 'hello.jsp' starting page</title>\r\n");
      out.write("\r\n");
      out.write("\t\t<meta http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("\t\t<meta http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("\t\t<meta http-equiv=\"expires\" content=\"0\">\r\n");
      out.write("\t\t<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\r\n");
      out.write("\t\t<meta http-equiv=\"description\" content=\"This is my page\">\r\n");
      out.write("\t\t<!--\r\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\">\r\n");
      out.write("\t-->\r\n");
      out.write("\r\n");
      out.write("\t</head>\r\n");
      out.write("\r\n");
      out.write("\t<body>\r\n");
      out.write("\t\t");
      if (_jspx_meth_c_out_0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("\t</body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n\r\n\r\n\r\n");
      response.setContentType("text/html;charset=UTF-8");
      out.write("\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n");
      Lang dico_lang = SessionTools.getLangFromSession(session, request);
      out.write("\r\n\r\n");
      out.write('\n');
      out.write('\r');
      out.write('\n');
      out.write(
          "\r\n\r\n<div class=\"main-cadre-contener\">\r\n\t\r\n\t<div class=\"main-cadre-top\">\r\n\t\t<h2>");
      out.print(DicoTools.dico(dico_lang, "services/configure"));
      out.write("</h2>\r\n\t</div>\r\n\t\r\n\t<div class=\"main-cadre-content\">\r\n\t\t");
      out.write("\t\r\n\t\t");
      //  bean:define
      org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_0 =
          (org.apache.struts.taglib.bean.DefineTag)
              _jspx_tagPool_bean_define_property_name_id_nobody.get(
                  org.apache.struts.taglib.bean.DefineTag.class);
      _jspx_th_bean_define_0.setPageContext(_jspx_page_context);
      _jspx_th_bean_define_0.setParent(null);
      _jspx_th_bean_define_0.setId("applicationId");
      _jspx_th_bean_define_0.setName("mySrvRssFreeForm");
      _jspx_th_bean_define_0.setProperty("applicationId");
      int _jspx_eval_bean_define_0 = _jspx_th_bean_define_0.doStartTag();
      if (_jspx_th_bean_define_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_bean_define_property_name_id_nobody.reuse(_jspx_th_bean_define_0);
        return;
      }
      _jspx_tagPool_bean_define_property_name_id_nobody.reuse(_jspx_th_bean_define_0);
      java.lang.Object applicationId = null;
      applicationId = (java.lang.Object) _jspx_page_context.findAttribute("applicationId");
      out.write("\r\n\t\t");
      //  bean:define
      org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_1 =
          (org.apache.struts.taglib.bean.DefineTag)
              _jspx_tagPool_bean_define_property_name_id_nobody.get(
                  org.apache.struts.taglib.bean.DefineTag.class);
      _jspx_th_bean_define_1.setPageContext(_jspx_page_context);
      _jspx_th_bean_define_1.setParent(null);
      _jspx_th_bean_define_1.setId("subscriptionId");
      _jspx_th_bean_define_1.setName("mySrvRssFreeForm");
      _jspx_th_bean_define_1.setProperty("subscriptionId");
      int _jspx_eval_bean_define_1 = _jspx_th_bean_define_1.doStartTag();
      if (_jspx_th_bean_define_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_bean_define_property_name_id_nobody.reuse(_jspx_th_bean_define_1);
        return;
      }
      _jspx_tagPool_bean_define_property_name_id_nobody.reuse(_jspx_th_bean_define_1);
      java.lang.Object subscriptionId = null;
      subscriptionId = (java.lang.Object) _jspx_page_context.findAttribute("subscriptionId");
      out.write("\r\n\t\t");
      //  bean:define
      org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_2 =
          (org.apache.struts.taglib.bean.DefineTag)
              _jspx_tagPool_bean_define_type_property_name_id_nobody.get(
                  org.apache.struts.taglib.bean.DefineTag.class);
      _jspx_th_bean_define_2.setPageContext(_jspx_page_context);
      _jspx_th_bean_define_2.setParent(null);
      _jspx_th_bean_define_2.setId("dispatch");
      _jspx_th_bean_define_2.setName("mySrvRssFreeForm");
      _jspx_th_bean_define_2.setProperty("dispatch");
      _jspx_th_bean_define_2.setType("String");
      int _jspx_eval_bean_define_2 = _jspx_th_bean_define_2.doStartTag();
      if (_jspx_th_bean_define_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_bean_define_type_property_name_id_nobody.reuse(_jspx_th_bean_define_2);
        return;
      }
      _jspx_tagPool_bean_define_type_property_name_id_nobody.reuse(_jspx_th_bean_define_2);
      String dispatch = null;
      dispatch = (String) _jspx_page_context.findAttribute("dispatch");
      out.write('\n');
      out.write('	');
      out.write('	');
      //  bean:define
      org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_3 =
          (org.apache.struts.taglib.bean.DefineTag)
              _jspx_tagPool_bean_define_property_name_id_nobody.get(
                  org.apache.struts.taglib.bean.DefineTag.class);
      _jspx_th_bean_define_3.setPageContext(_jspx_page_context);
      _jspx_th_bean_define_3.setParent(null);
      _jspx_th_bean_define_3.setId("subscribed");
      _jspx_th_bean_define_3.setName("mySrvRssFreeForm");
      _jspx_th_bean_define_3.setProperty("subscribed");
      int _jspx_eval_bean_define_3 = _jspx_th_bean_define_3.doStartTag();
      if (_jspx_th_bean_define_3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_bean_define_property_name_id_nobody.reuse(_jspx_th_bean_define_3);
        return;
      }
      _jspx_tagPool_bean_define_property_name_id_nobody.reuse(_jspx_th_bean_define_3);
      java.lang.Object subscribed = null;
      subscribed = (java.lang.Object) _jspx_page_context.findAttribute("subscribed");
      out.write("\r\n\t\t");
      //  bean:define
      org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_4 =
          (org.apache.struts.taglib.bean.DefineTag)
              _jspx_tagPool_bean_define_type_property_name_id_nobody.get(
                  org.apache.struts.taglib.bean.DefineTag.class);
      _jspx_th_bean_define_4.setPageContext(_jspx_page_context);
      _jspx_th_bean_define_4.setParent(null);
      _jspx_th_bean_define_4.setId("name");
      _jspx_th_bean_define_4.setName("mySrvRssFreeForm");
      _jspx_th_bean_define_4.setProperty("name");
      _jspx_th_bean_define_4.setType("String");
      int _jspx_eval_bean_define_4 = _jspx_th_bean_define_4.doStartTag();
      if (_jspx_th_bean_define_4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_bean_define_type_property_name_id_nobody.reuse(_jspx_th_bean_define_4);
        return;
      }
      _jspx_tagPool_bean_define_type_property_name_id_nobody.reuse(_jspx_th_bean_define_4);
      String name = null;
      name = (String) _jspx_page_context.findAttribute("name");
      out.write("\r\n\t\t");
      //  bean:define
      org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_5 =
          (org.apache.struts.taglib.bean.DefineTag)
              _jspx_tagPool_bean_define_type_property_name_id_nobody.get(
                  org.apache.struts.taglib.bean.DefineTag.class);
      _jspx_th_bean_define_5.setPageContext(_jspx_page_context);
      _jspx_th_bean_define_5.setParent(null);
      _jspx_th_bean_define_5.setId("rssNbNews");
      _jspx_th_bean_define_5.setName("mySrvRssFreeForm");
      _jspx_th_bean_define_5.setProperty("srvNbNews");
      _jspx_th_bean_define_5.setType("Integer");
      int _jspx_eval_bean_define_5 = _jspx_th_bean_define_5.doStartTag();
      if (_jspx_th_bean_define_5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_bean_define_type_property_name_id_nobody.reuse(_jspx_th_bean_define_5);
        return;
      }
      _jspx_tagPool_bean_define_type_property_name_id_nobody.reuse(_jspx_th_bean_define_5);
      Integer rssNbNews = null;
      rssNbNews = (Integer) _jspx_page_context.findAttribute("rssNbNews");
      out.write("\r\n\t\t\r\n\t\t");
      //  html:form
      org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 =
          (org.apache.struts.taglib.html.FormTag)
              _jspx_tagPool_html_form_styleId_styleClass_action.get(
                  org.apache.struts.taglib.html.FormTag.class);
      _jspx_th_html_form_0.setPageContext(_jspx_page_context);
      _jspx_th_html_form_0.setParent(null);
      _jspx_th_html_form_0.setAction("/action/srvRssFreeConfig");
      _jspx_th_html_form_0.setStyleId("srvRssFreeConfig");
      _jspx_th_html_form_0.setStyleClass("srvConfigForm");
      int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();
      if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\r\n\t\t\t");
          //  html:hidden
          org.apache.struts.taglib.html.HiddenTag _jspx_th_html_hidden_0 =
              (org.apache.struts.taglib.html.HiddenTag)
                  _jspx_tagPool_html_hidden_value_property_nobody.get(
                      org.apache.struts.taglib.html.HiddenTag.class);
          _jspx_th_html_hidden_0.setPageContext(_jspx_page_context);
          _jspx_th_html_hidden_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
          _jspx_th_html_hidden_0.setProperty("applicationId");
          _jspx_th_html_hidden_0.setValue(applicationId.toString());
          int _jspx_eval_html_hidden_0 = _jspx_th_html_hidden_0.doStartTag();
          if (_jspx_th_html_hidden_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_html_hidden_value_property_nobody.reuse(_jspx_th_html_hidden_0);
            return;
          }
          _jspx_tagPool_html_hidden_value_property_nobody.reuse(_jspx_th_html_hidden_0);
          out.write("\t\r\n\t\t\t");
          //  html:hidden
          org.apache.struts.taglib.html.HiddenTag _jspx_th_html_hidden_1 =
              (org.apache.struts.taglib.html.HiddenTag)
                  _jspx_tagPool_html_hidden_value_property_nobody.get(
                      org.apache.struts.taglib.html.HiddenTag.class);
          _jspx_th_html_hidden_1.setPageContext(_jspx_page_context);
          _jspx_th_html_hidden_1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
          _jspx_th_html_hidden_1.setProperty("subscriptionId");
          _jspx_th_html_hidden_1.setValue(subscriptionId.toString());
          int _jspx_eval_html_hidden_1 = _jspx_th_html_hidden_1.doStartTag();
          if (_jspx_th_html_hidden_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_html_hidden_value_property_nobody.reuse(_jspx_th_html_hidden_1);
            return;
          }
          _jspx_tagPool_html_hidden_value_property_nobody.reuse(_jspx_th_html_hidden_1);
          out.write("\t\r\n\t\t\t");
          //  html:hidden
          org.apache.struts.taglib.html.HiddenTag _jspx_th_html_hidden_2 =
              (org.apache.struts.taglib.html.HiddenTag)
                  _jspx_tagPool_html_hidden_value_property_nobody.get(
                      org.apache.struts.taglib.html.HiddenTag.class);
          _jspx_th_html_hidden_2.setPageContext(_jspx_page_context);
          _jspx_th_html_hidden_2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
          _jspx_th_html_hidden_2.setProperty("name");
          _jspx_th_html_hidden_2.setValue(name);
          int _jspx_eval_html_hidden_2 = _jspx_th_html_hidden_2.doStartTag();
          if (_jspx_th_html_hidden_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_html_hidden_value_property_nobody.reuse(_jspx_th_html_hidden_2);
            return;
          }
          _jspx_tagPool_html_hidden_value_property_nobody.reuse(_jspx_th_html_hidden_2);
          out.write("\t\r\n\t\t\t\r\n\t\t\t<hr class=\"spacer\">\r\n\t\t\t\t\r\n\t\t\t<label>");
          out.print(DicoTools.dico(dico_lang, "srv_rss/nb_news"));
          out.write(
              "</label>\r\n\t\t\t<input type=\"text\" id=\"rssNbNews\" name=\"srvNbNews\" size=\"2\" value=\"");
          out.print(rssNbNews);
          out.write("\" /> \r\n\t\t\t");
          out.print(DicoTools.dico(dico_lang, "srv_rss/msg_max_news"));
          out.write("\t\r\n\t\t\t<hr class=\"spacer\" />\r\n\t\t\t\r\n\t\t\t<h2>");
          out.print(DicoTools.dico(dico_lang, "srv_rss/listen_type"));
          out.write("</h2>\r\n\t\t\t<ul class=\"radio-chooser\">\r\n\t\t\t\t<li>\r\n\t\t\t\t\t");
          if (_jspx_meth_html_radio_0(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.write("<span>");
          out.print(DicoTools.dico(dico_lang, "srv_rss/week_and_week_end"));
          out.write("</span>\r\n\t\t\t\t\t<label class=\"big\">");
          out.print(DicoTools.dico(dico_lang, "srv_rss/choose_time_week"));
          out.write(
              "</label>\r\n\t\t\t\t\t<input id=\"time1\" class=\"hourPicker\" type=\"hidden\" name=\"scheduleW\" value=\"");
          if (_jspx_meth_bean_write_0(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.write(
              "\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t<hr class=\"spacer\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t<label class=\"big\">");
          out.print(DicoTools.dico(dico_lang, "srv_rss/choose_time_week_end"));
          out.write(
              "</label>\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<input id=\"time2\" class=\"hourPicker\" type=\"hidden\" name=\"scheduleWE\" value=\"");
          if (_jspx_meth_bean_write_1(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.write("\"><br/>\t\t\t\t\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t");
          if (_jspx_meth_html_radio_1(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.print(DicoTools.dico(dico_lang, "srv_rss/everytime_new"));
          out.write("\r\n\t\t\t\t\t");
          if (_jspx_meth_html_select_0(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.write(
              "\t\t\t\t\r\n\t\t\t\t</li>\r\n\t\t\t</ul>\r\n\t\t\t<hr class=\"spacer\">\r\n\t\t\t\r\n\t\t\t");
          if (_jspx_meth_html_hidden_3(_jspx_th_html_form_0, _jspx_page_context)) return;
          out.write("\r\n\t\t\t\r\n\t\t\t<div align=\"center\">\r\n\t\t\t\t");
          //  logic:equal
          org.apache.struts.taglib.logic.EqualTag _jspx_th_logic_equal_0 =
              (org.apache.struts.taglib.logic.EqualTag)
                  _jspx_tagPool_logic_equal_value_name.get(
                      org.apache.struts.taglib.logic.EqualTag.class);
          _jspx_th_logic_equal_0.setPageContext(_jspx_page_context);
          _jspx_th_logic_equal_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
          _jspx_th_logic_equal_0.setValue("true");
          _jspx_th_logic_equal_0.setName("subscribed");
          int _jspx_eval_logic_equal_0 = _jspx_th_logic_equal_0.doStartTag();
          if (_jspx_eval_logic_equal_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
              out.write("\r\n\t\t\t\t\t");
              out.write("\t\t\t\r\n\t\t\t\t\t");
              //  html:button
              org.apache.struts.taglib.html.ButtonTag _jspx_th_html_button_0 =
                  (org.apache.struts.taglib.html.ButtonTag)
                      _jspx_tagPool_html_button_value_styleClass_property_onclick.get(
                          org.apache.struts.taglib.html.ButtonTag.class);
              _jspx_th_html_button_0.setPageContext(_jspx_page_context);
              _jspx_th_html_button_0.setParent(
                  (javax.servlet.jsp.tagext.Tag) _jspx_th_logic_equal_0);
              _jspx_th_html_button_0.setProperty("delete");
              _jspx_th_html_button_0.setValue(DicoTools.dico(dico_lang, "srv_clock/deactivate"));
              _jspx_th_html_button_0.setStyleClass("genericDeleteBt");
              _jspx_th_html_button_0.setOnclick("serviceDelete();");
              int _jspx_eval_html_button_0 = _jspx_th_html_button_0.doStartTag();
              if (_jspx_eval_html_button_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                if (_jspx_eval_html_button_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                  out = _jspx_page_context.pushBody();
                  _jspx_th_html_button_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                  _jspx_th_html_button_0.doInitBody();
                }
                do {
                  out.print(DicoTools.dico(dico_lang, "srv_clock/deactivate"));
                  int evalDoAfterBody = _jspx_th_html_button_0.doAfterBody();
                  if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
                } while (true);
                if (_jspx_eval_html_button_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                  out = _jspx_page_context.popBody();
                }
              }
              if (_jspx_th_html_button_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _jspx_tagPool_html_button_value_styleClass_property_onclick.reuse(
                    _jspx_th_html_button_0);
                return;
              }
              _jspx_tagPool_html_button_value_styleClass_property_onclick.reuse(
                  _jspx_th_html_button_0);
              out.write("\r\n\t\t\t\t\t");
              out.write("\t\r\n\t\t\t\t\t");
              //  html:submit
              org.apache.struts.taglib.html.SubmitTag _jspx_th_html_submit_0 =
                  (org.apache.struts.taglib.html.SubmitTag)
                      _jspx_tagPool_html_submit_value_styleClass_property_onclick.get(
                          org.apache.struts.taglib.html.SubmitTag.class);
              _jspx_th_html_submit_0.setPageContext(_jspx_page_context);
              _jspx_th_html_submit_0.setParent(
                  (javax.servlet.jsp.tagext.Tag) _jspx_th_logic_equal_0);
              _jspx_th_html_submit_0.setProperty("update");
              _jspx_th_html_submit_0.setValue(DicoTools.dico(dico_lang, "srv_clock/update"));
              _jspx_th_html_submit_0.setStyleClass("genericBt");
              _jspx_th_html_submit_0.setOnclick("goDispatch('update', 'dispatchConfig')");
              int _jspx_eval_html_submit_0 = _jspx_th_html_submit_0.doStartTag();
              if (_jspx_eval_html_submit_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                if (_jspx_eval_html_submit_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                  out = _jspx_page_context.pushBody();
                  _jspx_th_html_submit_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                  _jspx_th_html_submit_0.doInitBody();
                }
                do {
                  out.print(DicoTools.dico(dico_lang, "srv_clock/update"));
                  int evalDoAfterBody = _jspx_th_html_submit_0.doAfterBody();
                  if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
                } while (true);
                if (_jspx_eval_html_submit_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                  out = _jspx_page_context.popBody();
                }
              }
              if (_jspx_th_html_submit_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _jspx_tagPool_html_submit_value_styleClass_property_onclick.reuse(
                    _jspx_th_html_submit_0);
                return;
              }
              _jspx_tagPool_html_submit_value_styleClass_property_onclick.reuse(
                  _jspx_th_html_submit_0);
              out.write("\t\r\n\t\t\t\t");
              int evalDoAfterBody = _jspx_th_logic_equal_0.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
            } while (true);
          }
          if (_jspx_th_logic_equal_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_logic_equal_value_name.reuse(_jspx_th_logic_equal_0);
            return;
          }
          _jspx_tagPool_logic_equal_value_name.reuse(_jspx_th_logic_equal_0);
          out.write("\r\n\t\t\t\t");
          //  logic:equal
          org.apache.struts.taglib.logic.EqualTag _jspx_th_logic_equal_1 =
              (org.apache.struts.taglib.logic.EqualTag)
                  _jspx_tagPool_logic_equal_value_name.get(
                      org.apache.struts.taglib.logic.EqualTag.class);
          _jspx_th_logic_equal_1.setPageContext(_jspx_page_context);
          _jspx_th_logic_equal_1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_form_0);
          _jspx_th_logic_equal_1.setValue("false");
          _jspx_th_logic_equal_1.setName("subscribed");
          int _jspx_eval_logic_equal_1 = _jspx_th_logic_equal_1.doStartTag();
          if (_jspx_eval_logic_equal_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
              out.write("\r\n\t\t\t\t\t");
              out.write("\t\t\t\t\r\n\t\t\t\t\t");
              //  html:submit
              org.apache.struts.taglib.html.SubmitTag _jspx_th_html_submit_1 =
                  (org.apache.struts.taglib.html.SubmitTag)
                      _jspx_tagPool_html_submit_value_styleClass_property_onclick.get(
                          org.apache.struts.taglib.html.SubmitTag.class);
              _jspx_th_html_submit_1.setPageContext(_jspx_page_context);
              _jspx_th_html_submit_1.setParent(
                  (javax.servlet.jsp.tagext.Tag) _jspx_th_logic_equal_1);
              _jspx_th_html_submit_1.setProperty("submit");
              _jspx_th_html_submit_1.setValue(DicoTools.dico(dico_lang, "srv_clock/activate"));
              _jspx_th_html_submit_1.setStyleClass("genericBt");
              _jspx_th_html_submit_1.setOnclick("goDispatch('activate', 'dispatchConfig')");
              int _jspx_eval_html_submit_1 = _jspx_th_html_submit_1.doStartTag();
              if (_jspx_eval_html_submit_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                if (_jspx_eval_html_submit_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                  out = _jspx_page_context.pushBody();
                  _jspx_th_html_submit_1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                  _jspx_th_html_submit_1.doInitBody();
                }
                do {
                  out.print(DicoTools.dico(dico_lang, "srv_clock/activate"));
                  int evalDoAfterBody = _jspx_th_html_submit_1.doAfterBody();
                  if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
                } while (true);
                if (_jspx_eval_html_submit_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                  out = _jspx_page_context.popBody();
                }
              }
              if (_jspx_th_html_submit_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _jspx_tagPool_html_submit_value_styleClass_property_onclick.reuse(
                    _jspx_th_html_submit_1);
                return;
              }
              _jspx_tagPool_html_submit_value_styleClass_property_onclick.reuse(
                  _jspx_th_html_submit_1);
              out.write("\r\n\t\t\t\t");
              int evalDoAfterBody = _jspx_th_logic_equal_1.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
            } while (true);
          }
          if (_jspx_th_logic_equal_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_logic_equal_value_name.reuse(_jspx_th_logic_equal_1);
            return;
          }
          _jspx_tagPool_logic_equal_value_name.reuse(_jspx_th_logic_equal_1);
          out.write("\r\n\t\t\t</div>\r\n\t\t");
          int evalDoAfterBody = _jspx_th_html_form_0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
      }
      if (_jspx_th_html_form_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_html_form_styleId_styleClass_action.reuse(_jspx_th_html_form_0);
        return;
      }
      _jspx_tagPool_html_form_styleId_styleClass_action.reuse(_jspx_th_html_form_0);
      out.write("\r\n\t\r\n\t\t");
      out.write(
          "\t\r\n\t</div>\r\n</div>\r\n\r\n<script type=\"text/javascript\">\r\n\t$(\"input.hourPicker\").hourSelect_InitN( false );\r\n\t$(\"ul.radio-chooser\").radioChooser();\r\n\t\r\n\t$(\"#srvRssFreeConfig\").submit(function(){\r\n\t\treturn nablifeValidateRssFreeConfig(");
      if (_jspx_meth_logic_equal_2(_jspx_page_context)) return;
      out.write(");\t\t\r\n\t});\r\n\t\r\n</script>\r\n\r\n\t\t");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #21
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html; charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\n");
      out.write("    \n");
      out.write("    \n");
      out.write("    \n");
      Class.forName("com.mysql.jdbc.Driver");
      out.write("\n");
      out.write("    \n");
      out.write("    \n");
      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\">\n");
      out.write("        <!-- Bootstrap css online -->\n");
      out.write(
          "        <link rel=\"stylesheet\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css\">\n");
      out.write("        <link  href=\"css/customcss.css\" rel=\"stylesheet\">\n");
      out.write(
          "        <script type=\"text/javascript\" src=\"js/jquery-1.10.2.min.js\"></script>\n");
      out.write("        <script src=\"js/bootstrap.min.js\"></script>\n");
      out.write("\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n");
      out.write("<title>Analysis of Algorithms : D.B.Phatak</title>\n");
      out.write("</head>\n");
      out.write("<body>\n");
      out.write("\n");
      out.write("<!--Header-->\n");
      out.write("\n");
      out.write("  ");

      String name = (String) session.getAttribute("pass");

      out.write("\n");
      out.write("    <div class=\"container\">\n");
      out.write("             <br>\n");
      out.write("            <!--HEADER -->\n");
      out.write("            <div class=\"header\">\n");
      out.write(
          "                <a href=\"index.jsp\" style=\"color: #000;\"> <ul class=\"nav nav-pills pull-left\" >\n");
      out.write(
          "                    <li id=\"brand_icon\">       <img src=\"Images/mic_logo.png\" alt=\"\" width=\"80px\" height=\"80px\"/></li>\n");
      out.write(
          "                    <li id=\"brand_name\"> <p class=\"title\"><span style=\"font-size: 70px;\">|</span> iClass <strong>Forum</strong></p></li>\n");
      out.write("\n");
      out.write("                </ul></a>\n");
      out.write(
          "                <!--   <p class=\"title1\">iClass</p>&nbsp;&nbsp;<p class=\"title2\">Forum</p> \n");
      out.write("                -->\n");
      out.write("                <form action=\"Login\" method=\"post\">\n");
      out.write("\n");
      out.write(
          "                    <ul class=\"nav nav-pills pull-right\" style=\"margin-top: 35px\">\n");
      out.write("                        <li><a href=\"index.jsp\">Home</a></li>\n");
      out.write("                        <li><a href=\"contactus.jsp\">Contact Us</a></li>\n");
      out.write("\n");
      out.write("                        ");
      if (name != null) {
        try {
          out.write("\n");
          out.write("\n");
          out.write("                        <li><a href=\"logout.jsp\">Logout</a></li>\n");
          out.write("                        <li style=\"margin-top: 10px\">Welcome ");
          out.print(name);
          out.write("</li>\n");
          out.write("\n");
          out.write("                        ");
        } catch (Exception e) {

          System.out.println("Problem :" + e);
        }

      } else {

        out.write("\n");
        out.write("\n");
        out.write("                        <li><a href=\"signup.jsp\">Login</a></li>\n");
        out.write("\n");
        out.write("                        ");
      }
      out.write("\n");
      out.write("\n");
      out.write("                    </ul>\n");
      out.write("                </form>\n");
      out.write("\n");
      out.write("\n");
      out.write("            </div>\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("            <br>\n");
      out.write("         \n");
      out.write("      \n");
      out.write("\n");
      out.write("        <!-- MODAL -->\n");
      out.write("        <form action=\"\" name=\"batti\" method=\"post\">\n");
      out.write("\n");
      out.write(
          "        <div class=\"modal fade\" id=\"myModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n");
      out.write("          <div class=\"modal-dialog\">\n");
      out.write("            <div class=\"modal-content\">\n");
      out.write("              <div class=\"modal-header\">\n");
      out.write(
          "                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n");
      out.write("                <h4 class=\"modal-title\" id=\"myModalLabel\">Answer here</h4>\n");
      out.write("              </div>\n");
      out.write("              <div class=\"modal-body\">\n");
      out.write("                                <div class=\"input-group input-group-lg\">\n");
      out.write("                                <span class=\"input-group-addon\">\n");
      out.write(
          "                                <span class=\"glyphicon glyphicon-pencil\"></span>\n");
      out.write("                                </span>\n");
      out.write(
          "                                <textarea class=\"form-control\" id=\"currentans\" name=\"mainanswer\" rows=\"10\" style=\"resize: vertical;\">\n");
      out.write("                                </textarea>\n");
      out.write("                                </div>\n");
      out.write("              </div>\n");
      out.write("              <div class=\"modal-footer\">\n");
      out.write(
          "              <input type=\"text\" id=\"hidden\" name=\"maindata\" value=\"JAI HO\"/>\n");
      out.write(
          "                <button type=\"button\" class=\"btn btn-primary\" onClick=\"saveAns()\">Save Answer</button>\n");
      out.write("              </div>\n");
      out.write("            </div>\n");
      out.write("          </div>\n");
      out.write("        </div>\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("    </form>\n");
      out.write("    <!-- MODAL ENDS HERE -->\n");
      out.write("\n");
      out.write("<div class=\"page1\" >          \n");
      out.write("                <center>\n");
      out.write("\n");
      out.write(
          "                    <font face=\"myFontThin\" size=\"6\" class=\"title\">Department of  </font><font face=\"myFontThick\" size=\"8\"><b>Computer Science</b></font>\n");
      out.write("                <br>\n");
      out.write("                   <font face=\"myFontThick\" size=\"5\">Prof. sunil</font>\n");
      out.write("                \n");
      out.write("                </center>\n");
      out.write(
          "                <br> <br>  <font face=\"myFontThick\" size=\"6\"><b> bbbbbb </b></font>\n");
      out.write("<br><br><br>\n");
      out.write("                        \n");
      out.write("\n");
      out.write("\n");
      out.write("            ");

      Connection connection =
          DriverManager.getConnection("jdbc:mysql://localhost/aakash", "root", "lavikothari");
      Statement statement = connection.createStatement();
      ResultSet resultset = statement.executeQuery("select * from qa27;");

      int i = 0, no, ct = 0;
      String qid, bid, ansdivid, buttonid, delbuttonid, userid, answerid;

      while (resultset.next()) {
        ct++;
        no = resultset.getInt(1);
        if (i < no) {
          i = no;
        }
        qid = "q" + no;
        ansdivid = "ans" + no;
        bid = "b" + no;
        buttonid = "button" + no;
        delbuttonid = "delbutton" + no;
        userid = "user" + no;
        answerid = "answer" + no;

        out.write("\n");
        out.write("        <!--  <form action=\"\" method=\"get\" name=\"batti\" > -->\n");
        out.write("\t    \n");
        out.write("\t<div class=\"panel panel-default\">\n");
        out.write("            <div class=\"panel-heading\">\n");
        out.write("                <h3 class=\"panel-title\">\n");
        out.write("                <div id=");
        out.print(userid);
        out.write(
            " style=\"font-style:bold ;font-size:15px; padding-left:0.5px ;text-shadow: 2px 2px 8px #6E6E6E\">\n");
        out.write("\t    \t");
        out.print(resultset.getString(4));
        out.write("\n");
        out.write("                </div>\n");
        out.write("                </h3>\n");
        out.write("            </div>\n");
        out.write("            <div class=\"panel-body\">\n");
        out.write("                <div id=");
        out.print(qid);
        out.write(" style=\"text-align:left ;font-size:20px;font-style:italic\">\n");
        out.write("\t\t\t");
        out.print(resultset.getString(2));
        out.write("<br><br>\n");
        out.write("\t\t</div>\n");
        out.write("\t    \t<div class=\"panel panel-default\" id=");
        out.print(ansdivid);
        out.write(" >\n");
        out.write("  \t\t\t\t<div class=\"panel-body\" >\n");
        out.write("   \t\t\t \t\t<p id=");
        out.print(answerid);
        out.write('>');
        out.print(resultset.getString(3));
        out.write("</p>\n");
        out.write(" \t\t \t\t</div>\n");
        out.write("\t\t</div>\n");
        out.write("\t\t<div id=");
        out.print(bid);
        out.write(" >\n");
        out.write("\t\t\t ");
        String condition = (String) session.getAttribute("pass");
        String prof1 = (String) session.getAttribute("Prof");
        String prof2 = (String) session.getAttribute("Prof2");

        // out.println("Lec="+condition);

        // out.println("prof1="+prof1);
        // out.println("prof2="+prof2);
        // System.out.println("Lec="+condition);
        if (condition != null && prof1.equals(prof2)) {

          out.write("       \n");
          out.write("\n");
          out.write(
              "                                <input type=\"button\" class=\"btn btn-primary btn-sm\" style=\"float:right;display:inline\" value=\"Delete\" onClick=\"delQues(this.id)\" id=");
          out.print(delbuttonid);
          out.write(" />\n");
          out.write(
              "                                <input type=\"button\" class=\"btn btn-primary btn-sm\" style=\"float:left;display:inline\" data-toggle=\"modal\" value=\"Answer\" data-target=\"#myModal\" onClick=\"myfunc(this.id)\" id=");
          out.print(buttonid);
          out.write(" />\n");
          out.write("                                ");
        }

        out.write("\n");
        out.write("         \n");
        out.write("\t\t</div>\n");
        out.write("            </div>\n");
        out.write("        </div>\n");
        out.write("\t\n");
        out.write("\t   \n");
        out.write("\t\t\n");
        out.write("        ");
      }
      out.write("\n");
      out.write("\n");
      out.write(
          "               <form action=\"\" name=\"delform\" method=\"post\" style=\"visibility:hidden\">\n");
      out.write("\n");
      out.write(
          "               <input type=\"text\" id= \"delfieldid\" name=\"delfield\" value=\"Namastey\" />\n");
      out.write(
          "               <input type=\"text\" id= \"futureid\" name=\"futurefield\" value=\"London\" />\n");
      out.write("               </form>\n");
      out.write("\n");
      out.write("\n");
      out.write("        <span id =\"debug\" style=\"visibility:hidden\">Hello </span>\n");
      out.write("\n");
      out.write("    </div>\n");
      out.write("</div>    \n");
      out.write("\t    \n");
      out.write(" \n");
      out.write("</div>\n");
      out.write(" \n");
      out.write(" </div>\n");
      out.write("        \n");
      out.write(" \n");
      out.write(" <script type=\"text/javascript\">\n");
      out.write("\t count=");
      out.print(ct);
      out.write(";\n");
      out.write("\t debugging=document.getElementById(\"debug\");\n");
      out.write("\t debugging.innerHTML=\"Count is\"+count;\n");
      out.write("\t hid=document.getElementById(\"hidden\");\n");
      out.write("\t hid.style.display='none';\n");
      out.write("\t \n");
      out.write("\t for (x=1;x<=count;x++)\n");
      out.write("\t {\t\n");
      out.write("\t\t y=document.getElementById(\"answer\"+x);\n");
      out.write("\t\t debug.innerHTML+=y.innerHTML;\n");
      out.write("\t\t z=document.getElementById(\"button\"+x);\n");
      out.write("\t\t if(y!=null && y.innerHTML==\"\")\n");
      out.write("\t\t {\n");
      out.write("\t\t document.getElementById(\"ans\"+x).style.display='none';\n");
      out.write("\t\t }\n");
      out.write("\t\t \n");
      out.write("\t\t else\n");
      out.write("\t\t\t {\n");
      out.write("\t\t\t if(z!=null){\n");
      out.write("\t\t\t z.value=\"Edit Answer\";\n");
      out.write("\t\t\t }\n");
      out.write("\t\t\t }\n");
      out.write("\t }\n");
      out.write("\n");
      out.write("\t function myfunc(clicked_id){\n");
      out.write("\t\t \n");
      out.write("\t\t hid.value=clicked_id;\n");
      out.write("\t\t quesid=clicked_id.replace(\"button\",\"q\");\n");
      out.write("\t\t ansid=clicked_id.replace(\"button\",\"answer\");\n");
      out.write("\t\t \n");
      out.write("\t\t question=document.getElementById(quesid).innerHTML;\n");
      out.write("\t\t answer=document.getElementById(ansid).innerHTML;\n");
      out.write("\t\t \n");
      out.write("\t\t answer.replace(\"  \",\"\");\n");
      out.write("\t\t question.replace(\"  \",\"\");\n");
      out.write("\t\t \n");
      out.write("\t\t document.getElementById(\"myModalLabel\").innerHTML=question;\n");
      out.write("\t\t document.getElementById(\"currentans\").value=answer;\n");
      out.write("\t\t \n");
      out.write("\t }\n");
      out.write("\t \n");
      out.write("\t\n");
      out.write("\t function saveAns()\n");
      out.write("\t {\n");
      out.write("\t\t document.batti.submit();\n");
      out.write("\t\t \n");
      out.write("\t\t ");

      String clid = request.getParameter("maindata");
      if (clid != null) {
        String tobeanswered = clid.replace("button", "");
        System.out.println(tobeanswered);
        String answer = request.getParameter("mainanswer");

        Statement stmt = connection.createStatement();
        String query = "update qa27 set ans ='" + answer + "' where id='" + tobeanswered + "';";

        stmt.executeUpdate(query);

        response.sendRedirect("lec.jsp#user" + tobeanswered);
      }

      out.write("\n");
      out.write("\t }\n");
      out.write("\t \n");
      out.write("\t \n");
      out.write("\n");
      out.write("\t function delQues(clicked_id)\n");
      out.write("\t {\n");
      out.write("\t\t \n");
      out.write("\t\t document.getElementById(\"delfieldid\").value=clicked_id;\n");
      out.write("\t\t \n");
      out.write("\t\t \n");
      out.write("\t\t\t document.getElementById(\"futureid\").value=\"yesssssssss\";\n");
      out.write("\t\t  v=parseInt(clicked_id.replace(\"delbutton\",\"\"))+1;\n");
      out.write("\t\t while(document.getElementById(\"user\"+v)==null && v<count)\n");
      out.write("\t\t\t {\n");
      out.write("\t\t\t v++;\n");
      out.write("\t\t\t document.getElementById(\"futureid\").value=\"user\"+v;\n");
      out.write("\t\t\t }\n");
      out.write("\t\t if(clicked_id==\"delbutton\"+count)\n");
      out.write("\t\t\t {\n");
      out.write("\t\t\t v=parseInt(clicked_id.replace(\"delbutton\",\"\"))-1;\n");
      out.write("\t\t\t }\n");
      out.write("\t\tdocument.getElementById(\"futureid\").value=\"user\"+v;\n");
      out.write("\t\t\t \n");
      out.write("\t\t document.delform.submit();\n");
      out.write("\t\t \n");
      out.write("\t\t ");

      String delid = request.getParameter("delfield");
      if (delid != null) {
        String tobedel = delid.replace("delbutton", "");
        System.out.println("Deleting " + tobedel);

        Statement stmt1 = connection.createStatement();
        String query1 = "delete from qa27 where id='" + tobedel + "';";

        stmt1.executeUpdate(query1);
        String futid = request.getParameter("futurefield");
        response.sendRedirect("lec.jsp#" + futid);
      }

      out.write("\n");
      out.write("\t\t \n");
      out.write("\t }\n");
      out.write("\t \n");
      out.write("\t \n");
      out.write("\t </script>\n");
      out.write("\t\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("</html> \n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
      out.write("<html ng-app=\"demo\">\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("<title>map</title>\r\n");
      out.write("<style rel='stylesheet'>\r\n");
      out.write("#container {\r\n");
      out.write("\twidth: 100%;\r\n");
      out.write("\theight: 400px;\r\n");
      out.write("}\r\n");
      out.write("</style>\r\n");
      out.write("<link rel='stylesheet'\r\n");
      out.write("\thref='");
      out.print(request.getContextPath());
      out.write("/public/bower_components/bootstrap/dist/css/bootstrap.min.css' />\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write("\t<div class=\"container\" ng-controller=\"demoController\">\r\n");
      out.write("\t\t<div class=\"page-header\">\r\n");
      out.write("\t\t\t<h1>\r\n");
      out.write("\t\t\t\tGeely CSP<small>高德地图Demo</small>\r\n");
      out.write("\t\t\t</h1>\r\n");
      out.write("\t\t</div>\r\n");
      out.write("\t\t<div class=\"container-fluid\">\r\n");
      out.write("\t\t\t<div class=\"row\">\r\n");
      out.write("\t\t\t\t<div class=\"col-md-8\">\r\n");
      out.write("\t\t\t\t\t<div class=\"input-group\">\r\n");
      out.write(
          "\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" placeholder=\"车辆ID\">\r\n");
      out.write("\t\t\t\t\t\t<span class=\"input-group-btn\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t<button class=\"btn btn-default\" type=\"button\">Search</button>\r\n");
      out.write("\t\t\t\t\t\t</span>\r\n");
      out.write("\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t<hr />\r\n");
      out.write("\t\t\t\t\t<div id=\"container\"></div>\r\n");
      out.write("\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t<div class=\"col-md-4\">\r\n");
      out.write("\t\t\t\t\t<div class=\"panel-group\" id=\"accordion\" role=\"tablist\"\r\n");
      out.write("\t\t\t\t\t\taria-multiselectable=\"true\">\r\n");
      out.write("\t\t\t\t\t\t<div class=\"panel panel-default\">\r\n");
      out.write("\t\t\t\t\t\t\t<div class=\"panel-heading\" role=\"tab\" id=\"headingOne\">\r\n");
      out.write("\t\t\t\t\t\t\t\t<h4 class=\"panel-title\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\t<a role=\"button\" data-toggle=\"collapse\"\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\tdata-parent=\"#accordion\" href=\"#collapseOne\"\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\taria-expanded=\"true\" aria-controls=\"collapseOne\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t车辆信息 </a>\r\n");
      out.write("\t\t\t\t\t\t\t\t</h4>\r\n");
      out.write("\t\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t\t<div id=\"collapseOne\" class=\"panel-collapse collapse in\"\r\n");
      out.write("\t\t\t\t\t\t\t\trole=\"tabpanel\" aria-labelledby=\"headingOne\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<div class=\"panel-body\" ng-bind=\"data.info.carInfo\"></div>\r\n");
      out.write("\t\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t<div class=\"panel panel-default\">\r\n");
      out.write("\t\t\t\t\t\t\t<div class=\"panel-heading\" role=\"tab\" id=\"headingTwo\">\r\n");
      out.write("\t\t\t\t\t\t\t\t<h4 class=\"panel-title\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t\t<a class=\"collapsed\" role=\"button\" data-toggle=\"collapse\"\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\tdata-parent=\"#accordion\" href=\"#collapseTwo\"\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\taria-expanded=\"false\" aria-controls=\"collapseTwo\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t街道信息 </a>\r\n");
      out.write("\t\t\t\t\t\t\t\t</h4>\r\n");
      out.write("\t\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t\t<div id=\"collapseTwo\" class=\"panel-collapse collapse\"\r\n");
      out.write("\t\t\t\t\t\t\t\trole=\"tabpanel\" aria-labelledby=\"headingTwo\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<div class=\"panel-body\" ng-bind=\"data.info.streetInfo\"></div>\r\n");
      out.write("\t\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t<div class=\"panel panel-default\">\r\n");
      out.write("\t\t\t\t\t\t\t<div class=\"panel-heading\" role=\"tab\" id=\"headingThree\">\r\n");
      out.write("\t\t\t\t\t\t\t\t<h4 class=\"panel-title\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t\t<a class=\"collapsed\" role=\"button\" data-toggle=\"collapse\"\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\tdata-parent=\"#accordion\" href=\"#collapseThree\"\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\taria-expanded=\"false\" aria-controls=\"collapseThree\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t事故详细 </a>\r\n");
      out.write("\t\t\t\t\t\t\t\t</h4>\r\n");
      out.write("\t\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t\t<div id=\"collapseThree\" class=\"panel-collapse collapse\"\r\n");
      out.write("\t\t\t\t\t\t\t\trole=\"tabpanel\" aria-labelledby=\"headingThree\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<div class=\"panel-body\" ng-bind=\"data.info.accidentInfo\"></div>\r\n");
      out.write("\t\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t</div>\r\n");
      out.write("\t\t\t</div>\r\n");
      out.write("\t\t</div>\r\n");
      out.write("\t</div>\r\n");
      out.write("\r\n");
      out.write("</body>\r\n");
      out.write(
          "<script type=\"text/javascript\" src=\"http://webapi.amap.com/maps?v=1.3&key=8624195bc8afebd5022bde7ec8306e05\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/public/bower_components/jquery/dist/jquery.min.js\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/public/bower_components/angular/angular.min.js\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/public/bower_components/bootstrap/dist/js/bootstrap.min.js\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/public/js/demo/demo.js\"></script>\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      /*
       * Copyright 2006 Pentaho Corporation.  All rights reserved.
       * This software was developed by Pentaho Corporation and is provided under the terms
       * of the Mozilla Public License, Version 1.1, or any later version. You may not use
       * this file except in compliance with the license. If you need a copy of the license,
       * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
       * BI Platform.  The Initial Developer is Pentaho Corporation.
       *
       * Software distributed under the Mozilla Public License is distributed on an "AS IS"
       * basis, WITHOUT WARRANTY OF ANY KIND, either express or  implied. Please refer to
       * the license for the specific language governing your rights and limitations.
       *
       * Created Feb 16, 2006
       * @author James Dixon  modified by Kurtis Cruzada
       */

      /*
       * This JSP is an example of how to use Pentaho components to build a dashboard.
       * The script in this file controls the layout and content generation of the dashboard.
       * See the document 'Dashboard Builder Guide' for more details
       */

      // set the character encoding e.g. UFT-8
      response.setCharacterEncoding(LocaleHelper.getSystemEncoding());

      // create a new Pentaho session
      IPentahoSession userSession = PentahoHttpSessionHelper.getPentahoSession(request);

      out.write("\t\r\n");
      out.write("\t");

      // See if we have a 'territory' parameter
      String territory = request.getParameter("territory");
      // See if we have a 'productline' parameter
      String productline = request.getParameter("productline");

      // Create the title for the top of the page
      String title = "Revenue Analysis";
      if (productline != null) {
        title = "Sales for " + territory + ", " + productline;
      } else if (territory != null) {
        title = "Sales for " + territory;
      }

      out.write("\r\n");
      out.write("\t<html>\n");
      out.write("\t<head>\r\n");
      out.write("\t\t<title>Steel Wheels - Revenue Analysis</title>\r\n");
      out.write("\t</head>\r\n");
      out.write("\t<body>\r\n");
      out.write("  \t<table  background=\"/sw-style/active/logo_backup.png\">\n");
      out.write("  \t\t<tr>\r\n");
      out.write(
          "  \t\t\t<td width=\"750\" height=\"40\" align=\"right\" valign=\"middle\" style=\"font-family:Arial;font-weight:bold\" border=\"0\"/>");
      out.print(title);
      out.write("</td>\n");
      out.write("  \t\t</tr>\t\t\n");
      out.write("  \t</table>\t\r\n");
      out.write(
          "  \t<table class=\"homeDashboard\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" >\r\n");
      out.write("\t<tr>\r\n");
      out.write("\t\t<td valign=\"top\" align=\"center\">\r\n");
      out.write("\t");

      // Make a pie chart showing the territories
      // create the parameres for the pie chart
      SimpleParameterProvider parameters = new SimpleParameterProvider();
      // define the click url template
      parameters.setParameter("drill-url", "SWDashboard?territory={TERRITORY}");
      // define the slices of the pie chart
      parameters.setParameter("inner-param", "TERRITORY"); // $NON-NLS-1$ //$NON-NLS-2$
      // set the width and the height
      parameters.setParameter("image-width", "350"); // $NON-NLS-1$ //$NON-NLS-2$
      parameters.setParameter("image-height", "200"); // $NON-NLS-1$ //$NON-NLS-2$
      StringBuffer content = new StringBuffer();
      ArrayList messages = new ArrayList();
      // call the chart helper to generate the pie chart image and to get the HTML content
      // use the chart definition in 'steel-wheels/dashboard/territory.widget.xml'
      ChartHelper.doPieChart(
          "steel-wheels",
          "dashboards",
          "territory.widget.xml",
          parameters,
          content,
          userSession,
          messages,
          null);

      out.write("\r\n");
      out.write("\t\t");
      out.print(content.toString());
      out.write("\r\n");
      out.write("\t\t</td>\t\t\t\r\n");
      out.write("\t\t<td valign=\"top\" align=\"center\">\r\n");
      out.write("\t");

      if (territory == null) {
        // if the user has clicked on a slice of the pie chart we should have a territory to work
        // with

        out.write("\t\t\t\r\n");
        out.write("\t");

        // Make a bar chart showing the department
        // create the parameres for the bar chart
        parameters = new SimpleParameterProvider();
        // define the click url template
        parameters.setParameter(
            "drill-url", "SWDashboard?territory=" + territory + "&amp;productline={SERIES}");
        parameters.setParameter("TERRITORY", territory);
        parameters.setParameter("outer-params", "TERRITORY");
        // define the category axis of the bar chart
        parameters.setParameter("inner-param", "TERRITORY"); // $NON-NLS-1$ //$NON-NLS-2$
        parameters.setParameter("inner-param", "PRODUCTLINE"); // $NON-NLS-1$ //$NON-NLS-2$
        // set the width and the height
        parameters.setParameter("image-width", "400"); // $NON-NLS-1$ //$NON-NLS-2$
        parameters.setParameter("image-height", "200"); // $NON-NLS-1$ //$NON-NLS-2$
        content = new StringBuffer();
        messages = new ArrayList();
        // call the chart helper to generate the pie chart image and to get the HTML content
        // use the chart definition in 'steel-wheels/dashboard/productline.widget.xml'
        ChartHelper.doChart(
            "steel-wheels",
            "dashboards",
            "productline_all.widget.xml",
            parameters,
            content,
            userSession,
            messages,
            null);

        out.write("\t\t\r\n");
        out.write("\t\t");
        out.print(content.toString());
        out.write("\r\n");
        out.write("\t\t");
      }

      out.write('\r');
      out.write('\n');
      out.write('	');

      if (territory != null) {
        // if the user has clicked on a slice of the pie chart we should have a territory to work
        // with

        out.write("\t\t\t\r\n");
        out.write("\t");

        // Make a bar chart showing the department
        // create the parameres for the bar chart
        parameters = new SimpleParameterProvider();
        // define the click url template
        parameters.setParameter(
            "drill-url", "SWDashboard?territory=" + territory + "&amp;productline={SERIES}");
        parameters.setParameter("TERRITORY", territory);
        parameters.setParameter("outer-params", "TERRITORY");
        // define the category axis of the bar chart
        parameters.setParameter("inner-param", "TERRITORY"); // $NON-NLS-1$ //$NON-NLS-2$
        parameters.setParameter("inner-param", "PRODUCTLINE"); // $NON-NLS-1$ //$NON-NLS-2$
        // set the width and the height
        parameters.setParameter("image-width", "400"); // $NON-NLS-1$ //$NON-NLS-2$
        parameters.setParameter("image-height", "200"); // $NON-NLS-1$ //$NON-NLS-2$
        content = new StringBuffer();
        messages = new ArrayList();
        // call the chart helper to generate the pie chart image and to get the HTML content
        // use the chart definition in 'steel-wheels/dashboard/productline.widget.xml'
        ChartHelper.doChart(
            "steel-wheels",
            "dashboards",
            "productline.widget.xml",
            parameters,
            content,
            userSession,
            messages,
            null);

        out.write("\r\n");
        out.write("\t\t\t");
        out.print(content.toString());
        out.write('\r');
        out.write('\n');
        out.write('	');
      }

      out.write("\r\n");
      out.write("\t\t</td>\r\n");
      out.write("\t</tr> \t\r\n");
      out.write("    </table>\n");
      out.write(
          "  \t<table class=\"homeDashboard\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" >\n");
      out.write("  \t<tr>\r\n");
      out.write("  \t\t<td valign=\"top\" align=\"center\"> \t  \t\t\t\t\r\n");
      out.write("  \t");

      if (productline != null) {

        // if the user has clicked on a bar of the bar chart we should have a territory and
        // productline to work with

        // create a dial and supply a value we create from the current time
        // create the parameters for the line chart
        parameters = new SimpleParameterProvider();
        parameters.setParameter("TERRITORY", territory);
        parameters.setParameter("outer-params", "TERRITORY");
        parameters.setParameter("PRODUCTLINE", productline);
        parameters.setParameter("outer-params", "PRODUCTLINE");
        // define the category axis of the bar chart
        parameters.setParameter("inner-param", "PRODUCTLINE"); // $NON-NLS-1$ //$NON-NLS-2$
        // set the width and the height
        parameters.setParameter("image-width", "750"); // $NON-NLS-1$ //$NON-NLS-2$
        parameters.setParameter("image-height", "200"); // $NON-NLS-1$ //$NON-NLS-2$
        content = new StringBuffer();
        messages = new ArrayList();
        // call the chart helper to generate the pie chart image and to get the HTML content
        // use the chart definition in 'steel-wheels/dashboard/regions.widget.xml'
        ChartHelper.doChart(
            "steel-wheels",
            "dashboards",
            "SalesOvertime.widget.xml",
            parameters,
            content,
            userSession,
            messages,
            null);

        out.write("\r\n");
        out.write("  \t");
        out.print(content.toString());
        out.write("\r\n");
        out.write("  \t");
      }

      out.write("\r\n");
      out.write(" \t");

      if (productline == null) {
        // if the user has clicked on a bar of the bar chart we should have a territory and
        // productline to work with
        // create a dial and supply a value we create from the current time
        // create the parameters for the line chart
        parameters = new SimpleParameterProvider();
        parameters.setParameter("TERRITORY", territory);
        parameters.setParameter("outer-params", "TERRITORY");
        // define the category axis of the bar chart
        parameters.setParameter("inner-param", "PRODUCTLINE"); // $NON-NLS-1$ //$NON-NLS-2$
        // set the width and the height
        parameters.setParameter("image-width", "750"); // $NON-NLS-1$ //$NON-NLS-2$
        parameters.setParameter("image-height", "200"); // $NON-NLS-1$ //$NON-NLS-2$
        content = new StringBuffer();
        messages = new ArrayList();
        // call the chart helper to generate the pie chart image and to get the HTML content
        // use the chart definition in 'steel-wheels/dashboard/regions.widget.xml'
        ChartHelper.doChart(
            "steel-wheels",
            "dashboards",
            "SalesOvertime_All.widget.xml",
            parameters,
            content,
            userSession,
            messages,
            null);

        out.write("  \t\t\r\n");
        out.write("  \t\t");
        out.print(content.toString());
        out.write("\r\n");
        out.write("  \t");
      }

      out.write("\t\r\n");
      out.write("  \t\t</td>\r\n");
      out.write("  \t</tr>\r\n");
      out.write("  </table>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n\n\n\n\n\n<html>\n<head>\n    <title>");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/style/global.css\">\n    <style type=\"text/css\">\n        .drop-shadow {\n             font-weight: bold;\n             font-size: 14pt;\n             color: white;\n             text-shadow: black 0.1em 0.1em 0.2em;\n             padding-top: 21px;}\n    </style>\n    <meta name=\"decorator\" content=\"none\"/>\n</head>\n\n");
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      java.util.HashMap errors = null;
      synchronized (_jspx_page_context) {
        errors =
            (java.util.HashMap) _jspx_page_context.getAttribute("errors", PageContext.PAGE_SCOPE);
        if (errors == null) {
          errors = new java.util.HashMap();
          _jspx_page_context.setAttribute("errors", errors, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      webManager.init(request, response, session, application, out);

      boolean create = request.getParameter("create") != null;
      String username = ParamUtils.getParameter(request, "username");
      String name = ParamUtils.getParameter(request, "name");
      String email = ParamUtils.getParameter(request, "email");
      String password = ParamUtils.getParameter(request, "password");
      String passwordConfirm = ParamUtils.getParameter(request, "passwordConfirm");
      String reCaptchaChallenge = ParamUtils.getParameter(request, "recaptcha_challenge_field");
      String reCaptchaResponse = ParamUtils.getParameter(request, "recaptcha_response_field");

      RegistrationPlugin plugin =
          (RegistrationPlugin)
              webManager.getXMPPServer().getPluginManager().getPlugin("registration");
      ReCaptcha reCaptcha = null;
      if (plugin.reCaptchaEnabled()) {
        reCaptcha =
            ReCaptchaFactory.newReCaptcha(
                plugin.getReCaptchaPublicKey(),
                plugin.getReCaptchaPrivateKey(),
                plugin.reCaptchaNoScript());
      }

      // Handle a request to create a user:
      if (create) {
        // Validate
        if (username == null) {
          errors.put("username", "");
        } else {
          try {
            username = username.trim().toLowerCase();
            username = JID.escapeNode(username);
            username = Stringprep.nodeprep(username);
          } catch (StringprepException se) {
            errors.put("username", "");
          }
        }
        if (password == null) {
          errors.put("password", "");
        }
        if (passwordConfirm == null) {
          errors.put("passwordConfirm", "");
        }
        if (password != null && passwordConfirm != null && !password.equals(passwordConfirm)) {
          errors.put("passwordMatch", "");
        }
        if (plugin.reCaptchaEnabled()) {
          ReCaptchaResponse captchaResponse = null;
          try {
            captchaResponse =
                reCaptcha.checkAnswer(
                    request.getRemoteAddr(), reCaptchaChallenge, reCaptchaResponse);
          } catch (Exception e) {
          }
          if (captchaResponse == null || !captchaResponse.isValid()) {
            errors.put("reCaptchaFail", "");
          }
        }

        // do a create if there were no errors
        if (errors.size() == 0) {
          try {
            webManager.getUserManager().createUser(username, password, name, email);

            response.sendRedirect("sign-up.jsp?success=true");
            return;
          } catch (UserAlreadyExistsException e) {
            errors.put("usernameAlreadyExists", "");
          } catch (Exception e) {
            errors.put("general", "");
            Log.error(e);
          }
        }
      }

      out.write(
          "\n\n<body>\n\n<div id=\"jive-header\">\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\">\n    <tbody>\n        <tr><td class=\"drop-shadow\">&nbsp;");
      out.print(plugin.getHeader());
      out.write("</td></tr>    \n    </tbody>\n</table>\n</div>\n\n<div id=\"jive-content\">\n\n");
      if (!plugin.webEnabled()) {
        out.write('\n');
        out.write('\n');
        if (_jspx_meth_fmt_message_1(_jspx_page_context)) return;
        out.write('\n');
        out.write('\n');
      } else {
        out.write("\n\n<p>");
        if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
        out.write("</p>\n\n");
        if (_jspx_meth_c_set_0(_jspx_page_context)) return;
        out.write('\n');
        if (_jspx_meth_c_set_1(_jspx_page_context)) return;
        out.write('\n');
        out.write('\n');
        if (!errors.isEmpty()) {
          out.write(
              "\n\n    <div class=\"jive-error\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n            <td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"/></td>\n            <td class=\"jive-icon-label\">\n\n            ");
          if (errors.get("general") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_3(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("username") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_4(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("usernameAlreadyExists") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_5(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("name") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_6(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("email") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_7(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("password") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_8(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("passwordMatch") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_9(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("passwordConfirm") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_10(_jspx_page_context)) return;
            out.write("\n            ");
          } else if (errors.get("reCaptchaFail") != null) {
            out.write("\n                ");
            if (_jspx_meth_fmt_message_11(_jspx_page_context)) return;
            out.write("\n            ");
          }
          out.write(
              "\n            </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n    <br>\n\n");
        } else if (request.getParameter("success") != null) {
          out.write(
              "\n\n    <div class=\"jive-success\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n            <td class=\"jive-icon\"><img src=\"images/success-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"></td>\n            <td class=\"jive-icon-label\">");
          if (_jspx_meth_fmt_message_12(_jspx_page_context)) return;
          out.write("</td>\n        </tr>\n    </tbody>\n    </table>\n    </div><br>\n\n");
        }
        out.write(
            "\n\n<form name=\"f\" action=\"sign-up.jsp\" method=\"get\">\n\n<div class=\"jive-contentBoxHeader\">");
        if (_jspx_meth_fmt_message_13(_jspx_page_context)) return;
        out.write(
            "</div>\n<div class=\"jive-contentBox\">\n    <div>\n    <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n    <tbody>\n    <tr>\n        <td width=\"1%\" nowrap><label for=\"usernametf\">");
        if (_jspx_meth_fmt_message_14(_jspx_page_context)) return;
        out.write(
            ":</label> *</td>\n        <td width=\"99%\">\n            <input type=\"text\" name=\"username\" size=\"30\" maxlength=\"75\" value=\"");
        out.print(((username != null) ? username : ""));
        out.write(
            "\"\n             id=\"usernametf\" autocomplete=\"off\">\n        </td>\n    </tr>\n    <tr>\n        <td width=\"1%\" nowrap>\n            <label for=\"nametf\">");
        if (_jspx_meth_fmt_message_15(_jspx_page_context)) return;
        out.write(
            ":</label>\n        </td>\n        <td width=\"99%\">\n            <input type=\"text\" name=\"name\" size=\"30\" maxlength=\"75\" value=\"");
        out.print(((name != null) ? name : ""));
        out.write(
            "\"\n             id=\"nametf\">\n        </td>\n    </tr>\n    <tr>\n        <td width=\"1%\" nowrap>\n            <label for=\"emailtf\">");
        if (_jspx_meth_fmt_message_16(_jspx_page_context)) return;
        out.write(
            ":</label></td>\n        <td width=\"99%\">\n            <input type=\"text\" name=\"email\" size=\"30\" maxlength=\"75\" value=\"");
        out.print(((email != null) ? email : ""));
        out.write(
            "\"\n             id=\"emailtf\">\n        </td>\n    </tr>\n    <tr>\n        <td nowrap>\n            <label for=\"passtf\">");
        if (_jspx_meth_fmt_message_17(_jspx_page_context)) return;
        out.write(
            ":</label> *\n        </td>\n        <td width=\"99%\">\n            <input type=\"password\" name=\"password\" value=\"\" size=\"20\" maxlength=\"75\"\n             id=\"passtf\">\n        </td>\n    </tr>\n    <tr>\n        <td width=\"1%\" nowrap>\n            <label for=\"confpasstf\">");
        if (_jspx_meth_fmt_message_18(_jspx_page_context)) return;
        out.write(
            ":</label> *\n        </td>\n        <td width=\"99%\">\n            <input type=\"password\" name=\"passwordConfirm\" value=\"\" size=\"20\" maxlength=\"75\"\n             id=\"confpasstf\">\n        </td>\n    </tr>\n    </tbody>\n    </table>\n    <br>\n    <span class=\"jive-description\">\n    * ");
        if (_jspx_meth_fmt_message_19(_jspx_page_context)) return;
        out.write("\n    </span>\n    </div>\n</div>\n\n");
        if (reCaptcha != null) {
          out.write('\n');
          out.print(reCaptcha.createRecaptchaHtml(null, null, 0));
          out.write('\n');
        }
        out.write("\n<input type=\"submit\" name=\"create\" value=\"");
        if (_jspx_meth_fmt_message_20(_jspx_page_context)) return;
        out.write(
            "\">\n\n</form>\n\n<script language=\"JavaScript\" type=\"text/javascript\">\ndocument.f.username.focus();\n</script>\n\n");
      }
      out.write("\n\n</body>\n</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #25
0
  public void generateFileChunks(JspWriter out, HttpServletRequest req) throws IOException {
    long startOffset = 0;

    int chunkSizeToView = 0;

    String referrer = req.getParameter("referrer");
    boolean noLink = false;
    if (referrer == null) {
      noLink = true;
    }

    String filename = req.getParameter("filename");
    if (filename == null) {
      out.print("Invalid input (file name absent)");
      return;
    }

    String namenodeInfoPortStr = req.getParameter("namenodeInfoPort");
    int namenodeInfoPort = -1;
    if (namenodeInfoPortStr != null) namenodeInfoPort = Integer.parseInt(namenodeInfoPortStr);

    String chunkSizeToViewStr = req.getParameter("chunkSizeToView");
    if (chunkSizeToViewStr != null && Integer.parseInt(chunkSizeToViewStr) > 0)
      chunkSizeToView = Integer.parseInt(chunkSizeToViewStr);
    else chunkSizeToView = jspHelper.defaultChunkSizeToView;

    if (!noLink) {
      out.print("<h3>Tail of File: ");
      JspHelper.printPathWithLinks(filename, out, namenodeInfoPort);
      out.print("</h3><hr>");
      out.print("<a href=\"" + referrer + "\">Go Back to File View</a><hr>");
    } else {
      out.print("<h3>" + filename + "</h3>");
    }
    out.print("<b>Chunk size to view (in bytes, up to file's DFS block size): </b>");
    out.print(
        "<input type=\"text\" name=\"chunkSizeToView\" value="
            + chunkSizeToView
            + " size=10 maxlength=10>");
    out.print("&nbsp;&nbsp;<input type=\"submit\" name=\"submit\" value=\"Refresh\"><hr>");
    out.print("<input type=\"hidden\" name=\"filename\" value=\"" + filename + "\">");
    out.print(
        "<input type=\"hidden\" name=\"namenodeInfoPort\" value=\"" + namenodeInfoPort + "\">");
    if (!noLink) out.print("<input type=\"hidden\" name=\"referrer\" value=\"" + referrer + "\">");

    // fetch the block from the datanode that has the last block for this file
    DFSClient dfs = new DFSClient(jspHelper.nameNodeAddr, jspHelper.conf);
    List<LocatedBlock> blocks =
        dfs.namenode.getBlockLocations(filename, 0, Long.MAX_VALUE).getLocatedBlocks();
    if (blocks == null || blocks.size() == 0) {
      out.print("No datanodes contain blocks of file " + filename);
      dfs.close();
      return;
    }
    LocatedBlock lastBlk = blocks.get(blocks.size() - 1);
    long blockSize = lastBlk.getBlock().getNumBytes();
    long blockId = lastBlk.getBlock().getBlockId();
    long genStamp = lastBlk.getBlock().getGenerationStamp();
    DatanodeInfo chosenNode;
    try {
      chosenNode = jspHelper.bestNode(lastBlk);
    } catch (IOException e) {
      out.print(e.toString());
      dfs.close();
      return;
    }
    InetSocketAddress addr = NetUtils.createSocketAddr(chosenNode.getName());
    // view the last chunkSizeToView bytes while Tailing
    if (blockSize >= chunkSizeToView) startOffset = blockSize - chunkSizeToView;
    else startOffset = 0;

    out.print("<textarea cols=\"100\" rows=\"25\" wrap=\"virtual\" style=\"width:100%\" READONLY>");
    jspHelper.streamBlockInAscii(
        addr, blockId, genStamp, blockSize, startOffset, chunkSizeToView, out);
    out.print("</textarea>");
    dfs.close();
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n\n\n\n\n\n\n\n\n\n\n\n");

      // Get handle on the Monitoring plugin
      MonitoringPlugin plugin =
          (MonitoringPlugin) XMPPServer.getInstance().getPluginManager().getPlugin("monitoring");
      ConversationManager conversationManager =
          (ConversationManager) plugin.getModule(ConversationManager.class);

      XMPPServer server = XMPPServer.getInstance();
      UserManager userManager = UserManager.getInstance();

      out.write(
          "\n\n<html>\n    <head>\n        <title>Conversations</title>\n        <meta name=\"pageID\" content=\"active-conversations\"/>\n        <script src=\"/js/prototype.js\" type=\"text/javascript\"></script>\n        <script src=\"/js/scriptaculous.js\" type=\"text/javascript\"></script>\n        <script src=\"/plugins/monitoring/dwr/engine.js\" type=\"text/javascript\" ></script>\n        <script src=\"/plugins/monitoring/dwr/util.js\" type=\"text/javascript\" ></script>\n        <script src=\"/plugins/monitoring/dwr/interface/conversations.js\" type=\"text/javascript\"></script>\n    </head>\n    <body>\n\n<style type=\"text/css\">\n\t@import \"style/style.css\";\n</style>\n<script type=\"text/javascript\">\nDWREngine.setErrorHandler(handleError);\nwindow.onerror = handleError;\nfunction handleError() {\n    // swallow errors: probably caused by the server being down\n}\n\nvar peConversations = new PeriodicalExecuter(conversationUpdater, 10);\n\nfunction conversationUpdater() {\n    try {\n        conversations.getConversations(updateConversations, true);\n    } catch(err) {\n");
      out.write(
          "        // swallow errors\n    }\n}\n\nfunction updateConversations(data) {\n    conversationsTable = $('conversations');\n    rows = conversationsTable.getElementsByTagName(\"tr\");\n    // loop over existing rows in the table\n    var rowsToDelete = new Array();\n    for (i = 0; i < rows.length; i++) {\n        // is this a conversation row?\n        if (rows[i].id == 'noconversations') {\n            rowsToDelete.push(i);\n        } else if (rows[i].id != '') {\n            // does the conversation exist in update we received?\n            convID = rows[i].id.replace('conversation-', '');\n            if (data[convID] != undefined) {\n\n                row = rows[i];\n                cells = row.getElementsByTagName('td');\n                conversation = data[convID];\n                if (cells[3].innerHTML != conversation.messageCount) {\n                    users = conversation.participant1 + '<br />' + conversation.participant2;\n                    cells[0].innerHTML = users;\n                    cells[1].innerHTML = conversation.duration;\n");
      out.write(
          "                    cells[2].innerHTML = conversation.lastActivity;\n                    cells[3].innerHTML = conversation.messageCount;\n                    new Effect.Highlight(row, {duration: 3.0});\n                }\n            // doesn't exist in update, delete from table\n            } else {\n                rowsToDelete.push(i);\n            }\n        }\n    }\n\n    for (i=0; i<rowsToDelete.length; i++) {\n        conversationsTable.deleteRow(rowsToDelete[i]);\n    }\n\n\n    // then add any new conversations from the update\n    counter = 0;\n    for (var c in data) {\n        counter++;\n        // does this conversation already exist?\n        if ($('conversation-' + c) == undefined) {\n            conversation = data[c];\n            users = conversation.participant1 + '<br />' + conversation.participant2;\n            var newTR = document.createElement(\"tr\");\n            newTR.setAttribute('id', 'conversation-' + c)\n            conversationsTable.appendChild(newTR);\n            var TD = document.createElement(\"TD\");\n");
      out.write(
          "            TD.innerHTML = users;\n            newTR.appendChild(TD);\n\n            TD = document.createElement(\"TD\");\n            TD.innerHTML = conversation.duration;\n            newTR.appendChild(TD);\n\n            TD = document.createElement(\"TD\");\n            TD.innerHTML = conversation.lastActivity;\n            newTR.appendChild(TD);\n\n            TD = document.createElement(\"TD\");\n            TD.innerHTML = conversation.messageCount;\n            newTR.appendChild(TD);\n        }\n    }\n\n    // update activeConversations number\n    $('activeConversations').innerHTML = counter;\n}\n\n</script>\n\n<!-- <a href=\"#\" onclick=\"conversationUpdater(); return false;\">click me</a> -->\n<p>\n    ");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write("\n    <span id=\"activeConversations\">");
      out.print(conversationManager.getConversationCount());
      out.write("</span\n</p>\n\n");

      Collection<Conversation> conversations = conversationManager.getConversations();

      out.write(
          "\n\n\n<div class=\"jive-table\">\n<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" id=\"conversations\">\n<thead>\n    <tr>\n        <th nowrap>");
      if (_jspx_meth_fmt_message_1(_jspx_page_context)) return;
      out.write("</th>\n        <th nowrap>");
      if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
      out.write("</th>\n        <th nowrap>");
      if (_jspx_meth_fmt_message_3(_jspx_page_context)) return;
      out.write("</th>\n        <th nowrap>");
      if (_jspx_meth_fmt_message_4(_jspx_page_context)) return;
      out.write("</th>\n    </tr>\n</thead>\n<tbody>\n    ");

      if (conversations.isEmpty()) {

        out.write(
            "\n        <tr id=\"noconversations\">\n            <td colspan=\"4\">\n                ");
        if (_jspx_meth_fmt_message_5(_jspx_page_context)) return;
        out.write("\n            </td>\n        </tr>\n\n    ");
      }
      out.write("\n    ");

      for (Conversation conversation : conversations) {
        Collection<JID> participants = conversation.getParticipants();

        out.write("\n    <tr id=\"conversation-");
        out.print(conversation.getConversationID());
        out.write("\">\n        <td>\n            ");
        if (conversation.getRoom() == null) {
          out.write("\n                ");
          for (JID jid : participants) {
            out.write("\n                    ");
            if (server.isLocal(jid) && userManager.isRegisteredUser(jid.getNode())) {
              out.write("\n                        <a href=\"/user-properties.jsp?username="******"');
              out.write('>');
              out.print(jid);
              out.write("</a><br />\n                    ");
            } else {
              out.write("\n                        ");
              out.print(jid.toBareJID());
              out.write("<br/>\n                    ");
            }
            out.write("\n                ");
          }
          out.write("\n            ");
        } else {
          out.write("\n                ");
          //  fmt:message
          org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_6 =
              (org.apache.taglibs.standard.tag.rt.fmt.MessageTag)
                  _jspx_tagPool_fmt_message_key.get(
                      org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
          _jspx_th_fmt_message_6.setPageContext(_jspx_page_context);
          _jspx_th_fmt_message_6.setParent(null);
          _jspx_th_fmt_message_6.setKey("archive.group_conversation");
          int _jspx_eval_fmt_message_6 = _jspx_th_fmt_message_6.doStartTag();
          if (_jspx_eval_fmt_message_6 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_fmt_message_6 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
              out = _jspx_page_context.pushBody();
              _jspx_th_fmt_message_6.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
              _jspx_th_fmt_message_6.doInitBody();
            }
            do {
              out.write("\n                    ");
              //  fmt:param
              org.apache.taglibs.standard.tag.rt.fmt.ParamTag _jspx_th_fmt_param_0 =
                  (org.apache.taglibs.standard.tag.rt.fmt.ParamTag)
                      _jspx_tagPool_fmt_param_value_nobody.get(
                          org.apache.taglibs.standard.tag.rt.fmt.ParamTag.class);
              _jspx_th_fmt_param_0.setPageContext(_jspx_page_context);
              _jspx_th_fmt_param_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_fmt_message_6);
              _jspx_th_fmt_param_0.setValue(
                  "<a href='../../muc-room-occupants.jsp?roomJID="
                      + URLEncoder.encode(conversation.getRoom().toBareJID(), "UTF-8")
                      + "'>");
              int _jspx_eval_fmt_param_0 = _jspx_th_fmt_param_0.doStartTag();
              if (_jspx_th_fmt_param_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
                return;
              }
              _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
              out.write("\n                    ");
              //  fmt:param
              org.apache.taglibs.standard.tag.rt.fmt.ParamTag _jspx_th_fmt_param_1 =
                  (org.apache.taglibs.standard.tag.rt.fmt.ParamTag)
                      _jspx_tagPool_fmt_param_value_nobody.get(
                          org.apache.taglibs.standard.tag.rt.fmt.ParamTag.class);
              _jspx_th_fmt_param_1.setPageContext(_jspx_page_context);
              _jspx_th_fmt_param_1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_fmt_message_6);
              _jspx_th_fmt_param_1.setValue("</a>");
              int _jspx_eval_fmt_param_1 = _jspx_th_fmt_param_1.doStartTag();
              if (_jspx_th_fmt_param_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_1);
                return;
              }
              _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_1);
              out.write("\n                ");
              int evalDoAfterBody = _jspx_th_fmt_message_6.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
            } while (true);
            if (_jspx_eval_fmt_message_6 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
              out = _jspx_page_context.popBody();
          }
          if (_jspx_th_fmt_message_6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_6);
            return;
          }
          _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_6);
          out.write("\n            ");
        }
        out.write("\n        </td>\n        ");

        long duration =
            conversation.getLastActivity().getTime() - conversation.getStartDate().getTime();

        out.write("\n        <td>");
        out.print(StringUtils.getTimeFromLong(duration));
        out.write("</td>\n        <td>");
        out.print(JiveGlobals.formatTime(conversation.getLastActivity()));
        out.write("</td>\n        <td>");
        out.print(conversation.getMessageCount());
        out.write("</td>\n    </tr>\n    ");
      }
      out.write("\n</tbody>\n</table>\n</div>\n\n</body>\n</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #27
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      /**
       * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
       *
       * <p>This library is free software; you can redistribute it and/or modify it under the terms
       * of the GNU Lesser General Public License as published by the Free Software Foundation;
       * either version 2.1 of the License, or (at your option) any later version.
       *
       * <p>This library is distributed in the hope that it will be useful, but WITHOUT ANY
       * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
       * PURPOSE. See the GNU Lesser General Public License for more details.
       */
      out.write('\n');
      out.write('\n');

      /**
       * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
       *
       * <p>This library is free software; you can redistribute it and/or modify it under the terms
       * of the GNU Lesser General Public License as published by the Free Software Foundation;
       * either version 2.1 of the License, or (at your option) any later version.
       *
       * <p>This library is distributed in the hope that it will be useful, but WITHOUT ANY
       * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
       * PURPOSE. See the GNU Lesser General Public License for more details.
       */
      out.write('\n');
      out.write('\n');

      /**
       * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
       *
       * <p>This library is free software; you can redistribute it and/or modify it under the terms
       * of the GNU Lesser General Public License as published by the Free Software Foundation;
       * either version 2.1 of the License, or (at your option) any later version.
       *
       * <p>This library is distributed in the hope that it will be useful, but WITHOUT ANY
       * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
       * PURPOSE. See the GNU Lesser General Public License for more details.
       */
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      //  liferay-theme:defineObjects
      com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 =
          (com.liferay.taglib.theme.DefineObjectsTag)
              _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody.get(
                  com.liferay.taglib.theme.DefineObjectsTag.class);
      _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
      _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null);
      int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 =
          _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.doStartTag();
      if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0.doEndTag()
          == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody.reuse(
            _jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
        return;
      }
      _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody.reuse(
          _jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
      com.liferay.portal.theme.ThemeDisplay themeDisplay = null;
      com.liferay.portal.model.Company company = null;
      com.liferay.portal.model.Account account = null;
      com.liferay.portal.model.User user = null;
      com.liferay.portal.model.User realUser = null;
      com.liferay.portal.model.Contact contact = null;
      com.liferay.portal.model.Layout layout = null;
      java.util.List layouts = null;
      java.lang.Long plid = null;
      com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null;
      java.lang.Long scopeGroupId = null;
      com.liferay.portal.security.permission.PermissionChecker permissionChecker = null;
      java.util.Locale locale = null;
      java.util.TimeZone timeZone = null;
      com.liferay.portal.model.Theme theme = null;
      com.liferay.portal.model.ColorScheme colorScheme = null;
      com.liferay.portal.theme.PortletDisplay portletDisplay = null;
      java.lang.Long portletGroupId = null;
      themeDisplay =
          (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay");
      company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company");
      account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account");
      user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user");
      realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser");
      contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact");
      layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout");
      layouts = (java.util.List) _jspx_page_context.findAttribute("layouts");
      plid = (java.lang.Long) _jspx_page_context.findAttribute("plid");
      layoutTypePortlet =
          (com.liferay.portal.model.LayoutTypePortlet)
              _jspx_page_context.findAttribute("layoutTypePortlet");
      scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
      permissionChecker =
          (com.liferay.portal.security.permission.PermissionChecker)
              _jspx_page_context.findAttribute("permissionChecker");
      locale = (java.util.Locale) _jspx_page_context.findAttribute("locale");
      timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone");
      theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme");
      colorScheme =
          (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme");
      portletDisplay =
          (com.liferay.portal.theme.PortletDisplay)
              _jspx_page_context.findAttribute("portletDisplay");
      portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
      out.write('\n');
      out.write('\n');

      /**
       * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
       *
       * <p>This library is free software; you can redistribute it and/or modify it under the terms
       * of the GNU Lesser General Public License as published by the Free Software Foundation;
       * either version 2.1 of the License, or (at your option) any later version.
       *
       * <p>This library is distributed in the hope that it will be useful, but WITHOUT ANY
       * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
       * PURPOSE. See the GNU Lesser General Public License for more details.
       */
      out.write('\n');
      out.write('\n');

      PortletRequest portletRequest =
          (PortletRequest) request.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);

      PortletResponse portletResponse =
          (PortletResponse) request.getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

      String namespace = StringPool.BLANK;

      boolean useNamespace =
          GetterUtil.getBoolean((String) request.getAttribute("aui:form:useNamespace"), true);

      if ((portletResponse != null) && useNamespace) {
        namespace = portletResponse.getNamespace();
      }

      String currentURL = PortalUtil.getCurrentURL(request);

      out.write('\n');
      out.write('\n');

      /**
       * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
       *
       * <p>This library is free software; you can redistribute it and/or modify it under the terms
       * of the GNU Lesser General Public License as published by the Free Software Foundation;
       * either version 2.1 of the License, or (at your option) any later version.
       *
       * <p>This library is distributed in the hope that it will be useful, but WITHOUT ANY
       * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
       * PURPOSE. See the GNU Lesser General Public License for more details.
       */
      out.write('\n');
      out.write('\n');
      out.write('\n');
      out.write('\n');

      String helpMessage =
          GetterUtil.getString((String) request.getAttribute("aui:field-wrapper:helpMessage"));
      String inlineLabel =
          GetterUtil.getString((String) request.getAttribute("aui:field-wrapper:inlineLabel"));
      String label = GetterUtil.getString((String) request.getAttribute("aui:field-wrapper:label"));
      String name = GetterUtil.getString((String) request.getAttribute("aui:field-wrapper:name"));

      boolean showForLabel = false;

      if (Validator.isNotNull(name)) {
        showForLabel = true;

        name = namespace + name;
      }

      out.write("\n");
      out.write("\n");
      out.write("\t\t");
      //  c:if
      org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 =
          (org.apache.taglibs.standard.tag.rt.core.IfTag)
              _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(
                  org.apache.taglibs.standard.tag.rt.core.IfTag.class);
      _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
      _jspx_th_c_005fif_005f0.setParent(null);
      // /html/taglib/aui/field_wrapper/end.jsp(34,2) name = test type = boolean reqTime = true
      // required = true fragment = false deferredValue = false expectedTypeName = null
      // deferredMethod = false methodSignature = null
      _jspx_th_c_005fif_005f0.setTest(inlineLabel.equals("right"));
      int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
      if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\n");
          out.write("\t\t\t<label ");
          out.print(_buildLabel(inlineLabel, showForLabel, name));
          out.write(">\n");
          out.write("\t\t\t\t");
          //  liferay-ui:message
          com.liferay.taglib.ui.MessageTag _jspx_th_liferay_002dui_005fmessage_005f0 =
              (com.liferay.taglib.ui.MessageTag)
                  _005fjspx_005ftagPool_005fliferay_002dui_005fmessage_0026_005fkey_005fnobody.get(
                      com.liferay.taglib.ui.MessageTag.class);
          _jspx_th_liferay_002dui_005fmessage_005f0.setPageContext(_jspx_page_context);
          _jspx_th_liferay_002dui_005fmessage_005f0.setParent(
              (javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0);
          // /html/taglib/aui/field_wrapper/end.jsp(36,4) name = key type = null reqTime = true
          // required = true fragment = false deferredValue = false expectedTypeName = null
          // deferredMethod = false methodSignature = null
          _jspx_th_liferay_002dui_005fmessage_005f0.setKey(label);
          int _jspx_eval_liferay_002dui_005fmessage_005f0 =
              _jspx_th_liferay_002dui_005fmessage_005f0.doStartTag();
          if (_jspx_th_liferay_002dui_005fmessage_005f0.doEndTag()
              == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fliferay_002dui_005fmessage_0026_005fkey_005fnobody.reuse(
                _jspx_th_liferay_002dui_005fmessage_005f0);
            return;
          }
          _005fjspx_005ftagPool_005fliferay_002dui_005fmessage_0026_005fkey_005fnobody.reuse(
              _jspx_th_liferay_002dui_005fmessage_005f0);
          out.write("\n");
          out.write("\n");
          out.write("\t\t\t\t");
          //  c:if
          org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 =
              (org.apache.taglibs.standard.tag.rt.core.IfTag)
                  _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(
                      org.apache.taglibs.standard.tag.rt.core.IfTag.class);
          _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context);
          _jspx_th_c_005fif_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0);
          // /html/taglib/aui/field_wrapper/end.jsp(38,4) name = test type = boolean reqTime = true
          // required = true fragment = false deferredValue = false expectedTypeName = null
          // deferredMethod = false methodSignature = null
          _jspx_th_c_005fif_005f1.setTest(Validator.isNotNull(helpMessage));
          int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag();
          if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
              out.write("\n");
              out.write("\t\t\t\t\t");
              //  liferay-ui:icon-help
              com.liferay.taglib.ui.IconHelpTag _jspx_th_liferay_002dui_005ficon_002dhelp_005f0 =
                  (com.liferay.taglib.ui.IconHelpTag)
                      _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_0026_005fmessage_005fnobody
                          .get(com.liferay.taglib.ui.IconHelpTag.class);
              _jspx_th_liferay_002dui_005ficon_002dhelp_005f0.setPageContext(_jspx_page_context);
              _jspx_th_liferay_002dui_005ficon_002dhelp_005f0.setParent(
                  (javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f1);
              // /html/taglib/aui/field_wrapper/end.jsp(39,5) name = message type = null reqTime =
              // true required = true fragment = false deferredValue = false expectedTypeName = null
              // deferredMethod = false methodSignature = null
              _jspx_th_liferay_002dui_005ficon_002dhelp_005f0.setMessage(helpMessage);
              int _jspx_eval_liferay_002dui_005ficon_002dhelp_005f0 =
                  _jspx_th_liferay_002dui_005ficon_002dhelp_005f0.doStartTag();
              if (_jspx_th_liferay_002dui_005ficon_002dhelp_005f0.doEndTag()
                  == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_0026_005fmessage_005fnobody
                    .reuse(_jspx_th_liferay_002dui_005ficon_002dhelp_005f0);
                return;
              }
              _005fjspx_005ftagPool_005fliferay_002dui_005ficon_002dhelp_0026_005fmessage_005fnobody
                  .reuse(_jspx_th_liferay_002dui_005ficon_002dhelp_005f0);
              out.write("\n");
              out.write("\t\t\t\t");
              int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
            } while (true);
          }
          if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
            return;
          }
          _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
          out.write("\n");
          out.write("\t\t\t</label>\n");
          out.write("\t\t");
          int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
      }
      if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
        return;
      }
      _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
      out.write("\n");
      out.write("\t</div>\n");
      out.write("</div>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            out.clearBuffer();
          } catch (java.io.IOException e) {
          }
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #28
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext =
          _jspxFactory.getPageContext(this, request, response, "../error.jsp", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n\n\n\n\n\n\n\n");
      org.jivesoftware.admin.AdminPageBean info = null;
      synchronized (request) {
        info =
            (org.jivesoftware.admin.AdminPageBean)
                _jspx_page_context.getAttribute("info", PageContext.REQUEST_SCOPE);
        if (info == null) {
          info = new org.jivesoftware.admin.AdminPageBean();
          _jspx_page_context.setAttribute("info", info, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\n');
      out.write('\n');
      org.jivesoftware.util.WebManager webManager = null;
      synchronized (_jspx_page_context) {
        webManager =
            (org.jivesoftware.util.WebManager)
                _jspx_page_context.getAttribute("webManager", PageContext.PAGE_SCOPE);
        if (webManager == null) {
          webManager = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("webManager", webManager, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
      webManager.init(request, response, session, application, out);
      out.write('\n');
      out.write('\n');
      //  decorator:usePage
      com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_usePage_0 =
          (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag)
              _jspx_tagPool_decorator_usePage_id_nobody.get(
                  com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
      _jspx_th_decorator_usePage_0.setPageContext(_jspx_page_context);
      _jspx_th_decorator_usePage_0.setParent(null);
      _jspx_th_decorator_usePage_0.setId("decoratedPage");
      int _jspx_eval_decorator_usePage_0 = _jspx_th_decorator_usePage_0.doStartTag();
      if (_jspx_th_decorator_usePage_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_decorator_usePage_id_nobody.reuse(_jspx_th_decorator_usePage_0);
        return;
      }
      _jspx_tagPool_decorator_usePage_id_nobody.reuse(_jspx_th_decorator_usePage_0);
      com.opensymphony.module.sitemesh.Page decoratedPage = null;
      decoratedPage =
          (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("decoratedPage");
      out.write('\n');
      out.write('\n');

      String path = request.getContextPath();
      // Decorated pages will typically must set a pageID and optionally set a subPageID
      // and extraParams. Store these values as request attributes so that the tab and sidebar
      // handling tags can get at the data.
      request.setAttribute("pageID", decoratedPage.getProperty("meta.pageID"));
      request.setAttribute("subPageID", decoratedPage.getProperty("meta.subPageID"));
      request.setAttribute("extraParams", decoratedPage.getProperty("meta.extraParams"));

      // Message HTML can be passed in:
      String message = decoratedPage.getProperty("page.message");

      out.write("\n\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n");
      if (_jspx_meth_fmt_setBundle_0(_jspx_page_context)) return;
      out.write("\n<html>\n<head>\n    <title>");
      out.print(AdminConsole.getAppName());
      out.write(' ');
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(':');
      out.write(' ');
      if (_jspx_meth_decorator_title_0(_jspx_page_context)) return;
      out.write(
          "</title>\n    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(path);
      out.write(
          "/style/global.css\">\n    <script language=\"JavaScript\" type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/prototype.js\"></script>\n    <script language=\"JavaScript\" type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/scriptaculous.js\"></script>\n    <script language=\"JavaScript\" type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/cookies.js\"></script>\n    <script language=\"JavaScript\" type=\"text/javascript\">\n\n    </script>\n    <script type=\"text/javascript\" src=\"");
      out.print(path);
      out.write(
          "/js/behaviour.js\"></script>\n    <script type=\"text/javascript\">\n    // Add a nice little rollover effect to any row in a jive-table object. This will help\n    // visually link left and right columns.\n    /*\n    var myrules = {\n        '.jive-table TBODY TR' : function(el) {\n            el.onmouseover = function() {\n                this.style.backgroundColor = '#ffffee';\n            }\n            el.onmouseout = function() {\n                this.style.backgroundColor = '#ffffff';\n            }\n        }\n    };\n    Behaviour.register(myrules);\n    */\n    </script>\n    ");
      if (_jspx_meth_decorator_head_0(_jspx_page_context)) return;
      out.write(
          "\n</head>\n\n<body id=\"jive-body\">\n\n<!-- BEGIN main -->\n<div id=\"main\">\n\n    <div id=\"jive-header\">\n        <div id=\"jive-logo\">\n            <a href=\"/index.jsp\"><img src=\"/images/login_logo.gif\" alt=\"Openfire\" width=\"179\" height=\"53\" /></a>\n        </div>\n        <div id=\"jive-userstatus\">\n            ");
      out.print(AdminConsole.getAppName());
      out.write(' ');
      out.print(AdminConsole.getVersionString());
      out.write("<br/>\n            ");
      //  fmt:message
      org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_1 =
          (org.apache.taglibs.standard.tag.rt.fmt.MessageTag)
              _jspx_tagPool_fmt_message_key.get(
                  org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
      _jspx_th_fmt_message_1.setPageContext(_jspx_page_context);
      _jspx_th_fmt_message_1.setParent(null);
      _jspx_th_fmt_message_1.setKey("admin.logged_in_as");
      int _jspx_eval_fmt_message_1 = _jspx_th_fmt_message_1.doStartTag();
      if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.pushBody();
          _jspx_th_fmt_message_1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
          _jspx_th_fmt_message_1.doInitBody();
        }
        do {
          //  fmt:param
          org.apache.taglibs.standard.tag.rt.fmt.ParamTag _jspx_th_fmt_param_0 =
              (org.apache.taglibs.standard.tag.rt.fmt.ParamTag)
                  _jspx_tagPool_fmt_param_value_nobody.get(
                      org.apache.taglibs.standard.tag.rt.fmt.ParamTag.class);
          _jspx_th_fmt_param_0.setPageContext(_jspx_page_context);
          _jspx_th_fmt_param_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_fmt_message_1);
          _jspx_th_fmt_param_0.setValue(
              "<strong>"
                  + StringUtils.escapeHTMLTags(JID.unescapeNode(webManager.getUser().getUsername()))
                  + "</strong>");
          int _jspx_eval_fmt_param_0 = _jspx_th_fmt_param_0.doStartTag();
          if (_jspx_th_fmt_param_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
            return;
          }
          _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
          int evalDoAfterBody = _jspx_th_fmt_message_1.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
        } while (true);
        if (_jspx_eval_fmt_message_1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
          out = _jspx_page_context.popBody();
      }
      if (_jspx_th_fmt_message_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_1);
        return;
      }
      _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_1);
      out.write(" - <a href=\"");
      out.print(path);
      out.write("/index.jsp?logout=true\">");
      out.print(LocaleUtils.getLocalizedString("global.logout"));
      out.write(
          "</a>\n        </div>\n        <div id=\"jive-nav\">\n            <div id=\"jive-nav-left\"></div>\n            ");
      if (_jspx_meth_admin_tabs_0(_jspx_page_context)) return;
      out.write(
          "\n            <div id=\"jive-nav-right\"></div>\n        </div>\n        <div id=\"jive-subnav\">\n            ");
      if (_jspx_meth_admin_subnavbar_0(_jspx_page_context)) return;
      out.write(
          "\n        </div>\n    </div>\n\n    <div id=\"jive-main\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n    <tbody>\n        <tr valign=\"top\">\n            <td width=\"1%\">\n                <div id=\"jive-sidebar-container\">\n                    <div id=\"jive-sidebar-box\">\n                        <div id=\"jive-sidebar\">\n                            ");
      if (_jspx_meth_admin_sidebar_0(_jspx_page_context)) return;
      out.write("\n                            <br>\n                            <img src=\"");
      out.print(path);
      out.write(
          "/images/blank.gif\" width=\"150\" height=\"1\" border=\"0\" alt=\"\">\n                        </div>\n                    </div>\n                </div>\n            </td>\n            <td width=\"99%\" id=\"jive-content\">\n\n\n                ");
      if (message != null) {
        out.write("\n\n                    ");
        out.print(message);
        out.write("\n\n                ");
      }
      out.write("\n\n                <h1>\n                    ");
      if (_jspx_meth_decorator_title_1(_jspx_page_context)) return;
      out.write(
          "\n                </h1>\n\n                <div id=\"jive-main-content\">\n                    ");
      if (_jspx_meth_decorator_body_0(_jspx_page_context)) return;
      out.write(
          "\n                </div>\n            </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n\n</div>\n<!-- END main -->\n\n<!-- BEGIN footer -->\n\t<div id=\"jive-footer\">\n        <div class=\"jive-footer-nav\">\n            ");
      if (_jspx_meth_admin_tabs_1(_jspx_page_context)) return;
      out.write(
          "\n        </div>\n        <div class=\"jive-footer-copyright\">\n            Built by <a href=\"http://www.jivesoftware.com\">Jive Software</a> and the <a href=\"http://www.igniterealtime.org\">IgniteRealtime.org</a> community\n        </div>\n    </div>\n<!-- END footer -->\n\n</body>\n</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Beispiel #29
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write(
          "<!--\n Licensed to Cloudera, Inc. under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  Cloudera, Inc. licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n<html><head>\n<!-- Copyright (c) 2010 Cloudera, Inc.  All rights reserved. -->\n<!-- Retro web 1.0 flume Agent configuration display -->\n\n<title>Flume Node: ");
      out.print(FlumeNode.getInstance().getPhysicalNodeName());
      out.write(
          " :: Sources and Sinks</title>\n\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/flume.css\" />\n\n</head>\n<body>\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(
          request, response, "menu_agent.jsp", out, false);
      out.write("\n\n<h1>Flume Node: ");
      out.print(FlumeNode.getInstance().getPhysicalNodeName());
      out.write(" :: Extensions - Sink/Source/Decorator</h1>\n\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(
          request, response, "version.jsp", out, false);
      out.write("\n<hr>\n\n\n<div id=\"sinks\">\n<h2>Sinks</h2>\n\n<table>\n\n");

      // treeset so that the list is sorted
      for (String n : new TreeSet<String>(FlumeBuilder.getSinkNames())) {

        out.write("\n    <tr><td>");
        out.print(n);
        out.write("</td></tr>\n");
      }

      out.write("\n\n</table>\n</div>\n\n<div id=\"sources\">\n<h2>Sources</h2>\n<table>\n\n");

      // treeset so that the list is sorted
      for (String n : new TreeSet<String>(FlumeBuilder.getSourceNames())) {

        out.write("\n    <tr><td>");
        out.print(n);
        out.write("</td></tr>\n");
      }

      out.write("\n\n</table>\n</div>\n\n<div id=\"decos\">\n<h2>Decorators</h2>\n<table>\n\n");

      // treeset so that the list is sorted
      for (String n : new TreeSet<String>(FlumeBuilder.getDecoratorNames())) {

        out.write("\n    <tr><td>");
        out.print(n);
        out.write("</td></tr>\n");
      }

      out.write("\n\n</table>\n</div>\n</body></html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n\n\n\n");

      boolean exportUsers = request.getParameter("exportUsers") != null;
      boolean success = request.getParameter("success") != null;
      boolean exportToFile = ParamUtils.getBooleanParameter(request, "exporttofile", true);

      ImportExportPlugin plugin =
          (ImportExportPlugin)
              XMPPServer.getInstance().getPluginManager().getPlugin("userimportexport");

      String exportText = "";

      Map<String, String> errors = new HashMap<String, String>();
      if (exportUsers) {
        if (exportToFile) {
          String file = ParamUtils.getParameter(request, "exportFile");
          if ((file == null) || (file.length() <= 0)) {
            errors.put("missingFile", "missingFile");
          } else {
            response.sendRedirect("export-file.jsp?fileName=" + file);
          }
        } else {
          try {
            exportText = plugin.exportUsersToString();
          } catch (IOException e) {
            errors.put("IOException", "IOException");
          }
        }
      }

      out.write(
          "\n\n<html>\n    <head>\n        <title>Export User Data</title>\n        <meta name=\"pageID\" content=\"import-export-selection\"/>\n    </head>\n    <body>\n\n");
      if (errors.size() > 0) {
        out.write(
            "\n\n    <div class=\"jive-error\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n            <td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"></td>\n            <td class=\"jive-icon-label\">\n            ");
        if (errors.containsKey("missingFile")) {
          out.write("\n                Missing or bad file name.\n            ");
        } else if (errors.containsKey("IOException") || errors.containsKey("fileNotCreated")) {
          out.write("\n                Couldn't create export file.\n            ");
        }
        out.write(
            "\n            </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n    <br>\n\n");
      } else if (ParamUtils.getBooleanParameter(request, "success")) {
        out.write(
            "\n\n    <div class=\"jive-success\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n            <td class=\"jive-icon\"><img src=\"images/success-16x16.gif\" width=\"16\" height=\"16\" border=\"0\"></td>\n            <td class=\"jive-icon-label\">User data successfully exported.</td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n    <br>\n    \n");
      }
      out.write(
          "\n\n<form action=\"export-user-data.jsp?exportUsers\" method=\"post\">\n\n<div class=\"jive-contentBoxHeader\">Export Options</div>\n<div class=\"jive-contentBox\">\n    <p>\n    Select the radio button next to the desired export option and then click on the Export button.\n    </p>\n    \n    <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n    <tbody>\n        <tr>\n            <td width=\"1%\"><input type=\"radio\" name=\"exporttofile\" value=\"true\" ");
      out.print(exportToFile ? "checked" : "");
      out.write(
          " id=\"rb01\"></td>\n            <td width=\"99%\"><label for=\"rb01\"><b>To File</b></label> - Save user data to the specified file location.</td>\n        </tr>\n        <tr>\n            <td width=\"1%\">&nbsp;</td>\n            <td width=\"99%\">Export File Name:&nbsp;<input type=\"text\" size=\"30\" maxlength=\"150\" name=\"exportFile\"></td>\n        </tr>\n        <tr>\n            <td width=\"1%\"><input type=\"radio\" name=\"exporttofile\" value=\"false\" ");
      out.print(!exportToFile ? "checked" : "");
      out.write(
          " id=\"rb02\"></td>\n            <td width=\"99%\"><label for=\"rb02\"><b>To Screen</b></label> - Display user data in the text area below.</td>            \n        </tr>\n        <tr>\n            <td width=\"1%\">&nbsp;</td>\n            <td width=\"99%\"><textarea cols=\"80\" rows=\"20\" wrap=off>");
      out.print(exportText);
      out.write(
          "</textarea></td>\n        </tr>\n    </tbody>\n    </table>\n</div>\n\n<input type=\"submit\" value=\"Export\">\n</form>\n\n</body>\n</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }