コード例 #1
0
 private String encode(String value, Page page) {
   if (StringUtils.isEmpty(value)) {
     return "";
   }
   String val =
       StringUtils.replace(
           SessionStorage.getInstance(page.getRequest()).encodeURL(value), " ", "%20");
   int pos = val.indexOf(";");
   if (pos > -1) {
     if (pos == 0) {
       return "";
     }
     val = val.substring(0, pos);
   }
   return val;
 }
コード例 #2
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.apache.jasper.runtime.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write('\n');

      JobTracker tracker = (JobTracker) application.getAttribute("job.tracker");
      ClusterStatus status = tracker.getClusterStatus();
      String trackerName = StringUtils.simpleHostname(tracker.getJobTrackerMachine());

      out.write("\n<html>\n<head>\n<title>");
      out.print(trackerName);
      out.write(
          " Hadoop Locality Statistics</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hadoop.css\">\n</head>\n<body>\n<h1>");
      out.print(trackerName);
      out.write(" Hadoop Locality Statistics</h1>\n\n<b>State:</b> ");
      out.print(status.getJobTrackerState());
      out.write("<br>\n<b>Started:</b> ");
      out.print(new Date(tracker.getStartTime()));
      out.write("<br>\n<b>Version:</b> ");
      out.print(VersionInfo.getVersion());
      out.write(",\n                r");
      out.print(VersionInfo.getRevision());
      out.write("<br>\n<b>Compiled:</b> ");
      out.print(VersionInfo.getDate());
      out.write(" by\n                 ");
      out.print(VersionInfo.getUser());
      out.write("<br>\n<b>Identifier:</b> ");
      out.print(tracker.getTrackerIdentifier());
      out.write("<br>\n\n<hr>\n\n");

      Collection<JobInProgress> jobs = new ArrayList<JobInProgress>();
      jobs.addAll(tracker.completedJobs());
      jobs.addAll(tracker.runningJobs());
      jobs.addAll(tracker.failedJobs());
      int dataLocalMaps = 0;
      int rackLocalMaps = 0;
      int totalMaps = 0;
      int totalReduces = 0;
      for (JobInProgress job : jobs) {
        Counters counters = job.getCounters();
        dataLocalMaps += counters.getCounter(JobInProgress.Counter.DATA_LOCAL_MAPS);
        rackLocalMaps += counters.getCounter(JobInProgress.Counter.RACK_LOCAL_MAPS);
        totalMaps += counters.getCounter(JobInProgress.Counter.TOTAL_LAUNCHED_MAPS);
        totalReduces += counters.getCounter(JobInProgress.Counter.TOTAL_LAUNCHED_REDUCES);
      }
      int dataLocalMapPct = totalMaps == 0 ? 0 : (100 * dataLocalMaps) / totalMaps;
      int rackLocalMapPct = totalMaps == 0 ? 0 : (100 * rackLocalMaps) / totalMaps;
      int dataRackLocalMapPct =
          totalMaps == 0 ? 0 : (100 * (dataLocalMaps + rackLocalMaps)) / totalMaps;

      out.write("\n<p>\n<b>Data Local Maps:</b> ");
      out.print(dataLocalMaps);
      out.write(' ');
      out.write('(');
      out.print(dataLocalMapPct);
      out.write("%) <br>\n<b>Rack Local Maps:</b> ");
      out.print(rackLocalMaps);
      out.write(' ');
      out.write('(');
      out.print(rackLocalMapPct);
      out.write("%) <br>\n<b>Data or Rack Local:</b> ");
      out.print(dataLocalMaps + rackLocalMaps);
      out.write(' ');
      out.write('(');
      out.print(dataRackLocalMapPct);
      out.write("%) <br>\n<b>Total Maps:</b> ");
      out.print(totalMaps);
      out.write(" <br>\n<b>Total Reduces:</b> ");
      out.print(totalReduces);
      out.write(" <br>\n</p>\n\n");

      out.println(ServletUtil.htmlFooter());

      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 {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
コード例 #3
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");
      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');
      // Get paramters
      boolean doTest = request.getParameter("test") != null;
      boolean cancel = request.getParameter("cancel") != null;
      boolean sent = ParamUtils.getBooleanParameter(request, "sent");
      boolean success = ParamUtils.getBooleanParameter(request, "success");
      String from = ParamUtils.getParameter(request, "from");
      String to = ParamUtils.getParameter(request, "to");
      String subject = ParamUtils.getParameter(request, "subject");
      String body = ParamUtils.getParameter(request, "body");

      // Cancel if requested
      if (cancel) {
        response.sendRedirect("system-email.jsp");
        return;
      }

      // Variable to hold messaging exception, if one occurs
      Exception mex = null;

      // Validate input
      Map<String, String> errors = new HashMap<String, String>();
      if (doTest) {
        if (from == null) {
          errors.put("from", "");
        }
        if (to == null) {
          errors.put("to", "");
        }
        if (subject == null) {
          errors.put("subject", "");
        }
        if (body == null) {
          errors.put("body", "");
        }

        EmailService service = EmailService.getInstance();

        // Validate host - at a minimum, it needs to be set:
        String host = service.getHost();
        if (host == null) {
          errors.put("host", "");
        }

        // if no errors, continue
        if (errors.size() == 0) {
          // Create a message
          MimeMessage message = service.createMimeMessage();
          // Set the date of the message to be the current date
          SimpleDateFormat format =
              new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", java.util.Locale.US);
          format.setTimeZone(JiveGlobals.getTimeZone());
          message.setHeader("Date", format.format(new Date()));

          // Set to and from.
          message.setRecipient(Message.RecipientType.TO, new InternetAddress(to, null));
          message.setFrom(new InternetAddress(from, null));
          message.setSubject(subject);
          message.setText(body);
          // Send the message, wrap in a try/catch:
          try {
            service.sendMessagesImmediately(Collections.singletonList(message));
            // success, so indicate this:
            response.sendRedirect("system-emailtest.jsp?sent=true&success=true");
            return;
          } catch (MessagingException me) {
            me.printStackTrace();
            mex = me;
          }
        }
      }

      // Set var defaults
      Collection<JID> jids = webManager.getXMPPServer().getAdmins();
      User user = null;
      if (!jids.isEmpty()) {
        for (JID jid : jids) {
          if (webManager.getXMPPServer().isLocal(jid)) {
            user = webManager.getUserManager().getUser(jid.getNode());
            if (user.getEmail() != null) {
              break;
            }
          }
        }
      }
      if (from == null) {
        from = user.getEmail();
      }
      if (to == null) {
        to = user.getEmail();
      }
      if (subject == null) {
        subject = "Test email sent via Openfire";
      }
      if (body == null) {
        body = "This is a test message.";
      }

      out.write("\n\n<html>\n    <head>\n        <title>");
      if (_jspx_meth_fmt_message_0(_jspx_page_context)) return;
      out.write(
          "</title>\n        <meta name=\"pageID\" content=\"system-email\"/>\n    </head>\n    <body>\n\n<script language=\"JavaScript\" type=\"text/javascript\">\nvar clicked = false;\nfunction checkClick(el) {\n    if (!clicked) {\n        clicked = true;\n        return true;\n    }\n    return false;\n}\n</script>\n\n<p>\n");
      if (_jspx_meth_fmt_message_1(_jspx_page_context)) return;
      out.write("\n</p>\n\n");
      if (JiveGlobals.getProperty("mail.smtp.host") == null) {
        out.write(
            "\n\n    <div class=\"jive-error\">\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    <tbody>\n        <tr>\n        \t<td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\n\t        <td class=\"jive-icon-label\">\n\t\t        ");
        if (_jspx_meth_fmt_message_2(_jspx_page_context)) return;
        out.write("\n\t        </td>\n        </tr>\n    </tbody>\n    </table>\n    </div>\n\n");
      }
      out.write('\n');
      out.write('\n');
      if (doTest || sent) {
        out.write("\n\n    ");
        if (success) {
          out.write(
              "\n\n        <div class=\"jive-success\">\n        <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n        <tbody>\n            <tr>\n            \t<td class=\"jive-icon\"><img src=\"images/success-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\n            \t<td class=\"jive-icon-label\">");
          if (_jspx_meth_fmt_message_3(_jspx_page_context)) return;
          out.write(
              "</td>\n            </tr>\n        </tbody>\n        </table>\n        </div>\n\n    ");
        } else {
          out.write(
              "\n\n        <div class=\"jive-error\">\n        <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n        <tbody>\n            <tr><td class=\"jive-icon\"><img src=\"images/error-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"></td>\n            <td class=\"jive-icon-label\">\n                ");
          if (_jspx_meth_fmt_message_4(_jspx_page_context)) return;
          out.write("\n                ");
          if (mex != null) {
            out.write("\n                    ");
            if (mex instanceof AuthenticationFailedException) {
              out.write("\n                    \t");
              if (_jspx_meth_fmt_message_5(_jspx_page_context)) return;
              out.write("                        \n                    ");
            } else {
              out.write("\n                        (Message: ");
              out.print(mex.getMessage());
              out.write(")\n                    ");
            }
            out.write("\n                ");
          }
          out.write(
              "\n            </td></tr>\n        </tbody>\n        </table>\n        </div>\n\n    ");
        }
        out.write("\n\n    <br>\n\n");
      }
      out.write(
          "\n\n<form action=\"system-emailtest.jsp\" method=\"post\" name=\"f\" onsubmit=\"return checkClick(this);\">\n\n<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\n<tbody>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_6(_jspx_page_context)) return;
      out.write(":\n        </td>\n        <td>\n            ");
      String host = JiveGlobals.getProperty("mail.smtp.host");
      if (host == null) {

        out.write("\n                <i>");
        if (_jspx_meth_fmt_message_7(_jspx_page_context)) return;
        out.write("</i>\n            ");

      } else {

        out.write("\n                ");
        out.print(host);
        out.write(':');
        out.print(JiveGlobals.getIntProperty("mail.smtp.port", 25));
        out.write("\n\n                ");
        if (JiveGlobals.getBooleanProperty("mail.smtp.ssl", false)) {
          out.write("\n\n                    (");
          if (_jspx_meth_fmt_message_8(_jspx_page_context)) return;
          out.write(")\n\n                ");
        }
        out.write("\n            ");
      }
      out.write("\n        </td>\n    </tr>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_9(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <input type=\"hidden\" name=\"from\" value=\"");
      out.print(from);
      out.write("\">\n            ");
      out.print(StringUtils.escapeHTMLTags(from));
      out.write(
          "\n            <span class=\"jive-description\">\n            (<a href=\"user-edit-form.jsp?username="******"\">Update Address</a>)\n            </span>\n        </td>\n    </tr>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_10(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <input type=\"text\" name=\"to\" value=\"");
      out.print(((to != null) ? to : ""));
      out.write(
          "\"\n             size=\"40\" maxlength=\"100\">\n        </td>\n    </tr>\n    <tr>\n        <td>\n            ");
      if (_jspx_meth_fmt_message_11(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <input type=\"text\" name=\"subject\" value=\"");
      out.print(((subject != null) ? subject : ""));
      out.write(
          "\"\n             size=\"40\" maxlength=\"100\">\n        </td>\n    </tr>\n    <tr valign=\"top\">\n        <td>\n            ");
      if (_jspx_meth_fmt_message_12(_jspx_page_context)) return;
      out.write(
          ":\n        </td>\n        <td>\n            <textarea name=\"body\" cols=\"45\" rows=\"5\" wrap=\"virtual\">");
      out.print(body);
      out.write(
          "</textarea>\n        </td>\n    </tr>\n    <tr>\n        <td colspan=\"2\">\n            <br>\n            <input type=\"submit\" name=\"test\" value=\"");
      if (_jspx_meth_fmt_message_13(_jspx_page_context)) return;
      out.write("\">\n            <input type=\"submit\" name=\"cancel\" value=\"");
      if (_jspx_meth_fmt_message_14(_jspx_page_context)) return;
      out.write(
          "\">\n        </td>\n    </tr>\n</tbody>\n</table>\n\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);
    }
  }
コード例 #4
0
ファイル: _view2__jsp.java プロジェクト: tcongwu/Myconf
  public void _jspService(
      javax.servlet.http.HttpServletRequest request,
      javax.servlet.http.HttpServletResponse response)
      throws java.io.IOException, javax.servlet.ServletException {
    com.caucho.jsp.QPageContext pageContext =
        (com.caucho.jsp.QPageContext)
            com.caucho.jsp.QJspFactory.create()
                .getPageContext(this, request, response, "/error.jsp", true, 8192, true);
    javax.servlet.jsp.JspWriter out = (javax.servlet.jsp.JspWriter) pageContext.getOut();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.http.HttpSession session = pageContext.getSession();
    javax.servlet.ServletContext application = pageContext.getServletContext();
    response.setContentType("text/html;charset=UTF-8");
    request.setCharacterEncoding("UTF-8");
    org.myconf.AuthTag _jsp_tag0 = null;
    org.apache.struts.taglib.bean.MessageTag _jsp_tag1 = null;
    org.apache.struts.taglib.html.RewriteTag _jsp_tag2 = null;
    org.apache.struts.taglib.bean.MessageTag _jsp_tag3 = null;
    try {

      // *********************************
      // security
      // *********************************

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      if (_jsp_tag0 == null) {
        _jsp_tag0 = new org.myconf.AuthTag();
        _jsp_tag0.setPageContext(pageContext);
        _jsp_tag0.setParent((javax.servlet.jsp.tagext.Tag) null);
        _jsp_tag0.setModule("admin");
      }

      _jsp_tag0.doStartTag();
      _jsp_tag0.setBodyContent(null);
      int _jsp_endTagVar3 = _jsp_tag0.doEndTag();
      if (_jsp_endTagVar3 == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);

      // *********************************
      // define
      // *********************************

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);

      // *********************************
      // variable
      // *********************************

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);

      // bbs data
      int id = RequestUtils.getParam(request, "id", 0);
      List list = BBSDAO.getDiscuss(id);
      if ((list == null) || (list.size() == 0)) {
        response.sendRedirect(
            Globals.root(request)
                + "/bbs/index2.jsp?page="
                + StringUtils.exportString(request.getParameter("page")));
        return;
      }
      String defaultTitle = null;
      BBSBean bbs = null;

      pageContext.write(_jsp_string1, 0, _jsp_string1.length);

      // *********************************
      // head
      // *********************************

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.include("/inc/head.jsp");
      pageContext.write(_jsp_string2, 0, _jsp_string2.length);

      // *********************************
      // top
      // *********************************

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.include("/inc/logo_admin.jsp");
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);

      // *********************************
      // content
      // *********************************

      pageContext.write(_jsp_string3, 0, _jsp_string3.length);
      if (_jsp_tag1 == null) {
        _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
        _jsp_tag1.setPageContext(pageContext);
        _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
      }

      _jsp_tag1.setKey("error.staritem.not.null");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string4, 0, _jsp_string4.length);
      _jsp_tag1.setKey("error.staritem.not.null");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string5, 0, _jsp_string5.length);
      _jsp_tag1.setKey("common.title.bbs");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string6, 0, _jsp_string6.length);
      if (((BBSBean) list.get(0)).getIsTop() == BBSBean.TRUE) {
        pageContext.write(_jsp_string7, 0, _jsp_string7.length);
        if (_jsp_tag2 == null) {
          _jsp_tag2 = new org.apache.struts.taglib.html.RewriteTag();
          _jsp_tag2.setPageContext(pageContext);
          _jsp_tag2.setParent((javax.servlet.jsp.tagext.Tag) null);
        }

        _jsp_tag2.setPage("/bbs.do");
        int _jspEval15 = _jsp_tag2.doStartTag();
        int _jsp_endTagVar16 = _jsp_tag2.doEndTag();
        if (_jsp_endTagVar16 == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
        pageContext.write(_jsp_string8, 0, _jsp_string8.length);
        out.print((id));
        pageContext.write(_jsp_string9, 0, _jsp_string9.length);
        out.print((id));
        pageContext.write(_jsp_string10, 0, _jsp_string10.length);
        out.print((StringUtils.exportString(request.getParameter("page"))));
        pageContext.write(_jsp_string11, 0, _jsp_string11.length);
        if (_jsp_tag1 == null) {
          _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
          _jsp_tag1.setPageContext(pageContext);
          _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
        }

        _jsp_tag1.setKey("common.text.bbs.cancel.top");
        _jsp_tag1.doStartTag();
        pageContext.write(_jsp_string12, 0, _jsp_string12.length);
      } else {
        pageContext.write(_jsp_string13, 0, _jsp_string13.length);
        if (_jsp_tag2 == null) {
          _jsp_tag2 = new org.apache.struts.taglib.html.RewriteTag();
          _jsp_tag2.setPageContext(pageContext);
          _jsp_tag2.setParent((javax.servlet.jsp.tagext.Tag) null);
        }

        _jsp_tag2.setPage("/bbs.do");
        int _jspEval22 = _jsp_tag2.doStartTag();
        int _jsp_endTagVar23 = _jsp_tag2.doEndTag();
        if (_jsp_endTagVar23 == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
        pageContext.write(_jsp_string8, 0, _jsp_string8.length);
        out.print((id));
        pageContext.write(_jsp_string9, 0, _jsp_string9.length);
        out.print((id));
        pageContext.write(_jsp_string10, 0, _jsp_string10.length);
        out.print((StringUtils.exportString(request.getParameter("page"))));
        pageContext.write(_jsp_string14, 0, _jsp_string14.length);
        if (_jsp_tag1 == null) {
          _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
          _jsp_tag1.setPageContext(pageContext);
          _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
        }

        _jsp_tag1.setKey("common.text.bbs.top.article");
        _jsp_tag1.doStartTag();
        pageContext.write(_jsp_string12, 0, _jsp_string12.length);
      }
      pageContext.write(_jsp_string15, 0, _jsp_string15.length);
      if (_jsp_tag2 == null) {
        _jsp_tag2 = new org.apache.struts.taglib.html.RewriteTag();
        _jsp_tag2.setPageContext(pageContext);
        _jsp_tag2.setParent((javax.servlet.jsp.tagext.Tag) null);
      }

      _jsp_tag2.setPage("/bbs.do");
      int _jspEval29 = _jsp_tag2.doStartTag();
      int _jsp_endTagVar30 = _jsp_tag2.doEndTag();
      if (_jsp_endTagVar30 == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      pageContext.write(_jsp_string16, 0, _jsp_string16.length);
      out.print((id));
      pageContext.write(_jsp_string17, 0, _jsp_string17.length);
      out.print((list.size()));
      pageContext.write(_jsp_string18, 0, _jsp_string18.length);
      out.print((StringUtils.exportString(request.getParameter("page"))));
      pageContext.write(_jsp_string19, 0, _jsp_string19.length);

      for (int i = 0; i < list.size(); i++) {
        bbs = (BBSBean) list.get(i);
        if (i == 0) {
          defaultTitle = "RE:" + bbs.getTitle();
        }

        pageContext.write(_jsp_string20, 0, _jsp_string20.length);
        out.print((i));
        pageContext.write(_jsp_string21, 0, _jsp_string21.length);
        out.print((i));
        pageContext.write(_jsp_string22, 0, _jsp_string22.length);
        out.print((bbs.getId()));
        pageContext.write(_jsp_string23, 0, _jsp_string23.length);
        out.print((bbs.getTitle()));
        pageContext.write(_jsp_string24, 0, _jsp_string24.length);
        if (i == 0) {
          if (_jsp_tag1 == null) {
            _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
            _jsp_tag1.setPageContext(pageContext);
            _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
          }

          _jsp_tag1.setKey("common.text.bbs.master");
          _jsp_tag1.doStartTag();
        } else {
          if (_jsp_tag3 == null) {
            _jsp_tag3 = new org.apache.struts.taglib.bean.MessageTag();
            _jsp_tag3.setPageContext(pageContext);
            _jsp_tag3.setParent((javax.servlet.jsp.tagext.Tag) null);
            _jsp_tag3.setKey("common.text.bbs.ceng");
          }

          _jsp_tag3.setArg0(String.valueOf(i));
          _jsp_tag3.doStartTag();
        }
        pageContext.write(_jsp_string25, 0, _jsp_string25.length);
        out.print((bbs.getContent().replaceAll("\r", "<br>")));
        pageContext.write(_jsp_string26, 0, _jsp_string26.length);
        if (i == 0) {
          if (_jsp_tag1 == null) {
            _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
            _jsp_tag1.setPageContext(pageContext);
            _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
          }

          _jsp_tag1.setKey("common.text.bbs.beginer");
          _jsp_tag1.doStartTag();
        } else {
          if (_jsp_tag1 == null) {
            _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
            _jsp_tag1.setPageContext(pageContext);
            _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
          }

          _jsp_tag1.setKey("common.text.bbs.replyer");
          _jsp_tag1.doStartTag();
        }
        pageContext.write(_jsp_string27, 0, _jsp_string27.length);
        out.print((bbs.getAuthorName()));
        pageContext.write(_jsp_string28, 0, _jsp_string28.length);
        if (_jsp_tag1 == null) {
          _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
          _jsp_tag1.setPageContext(pageContext);
          _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
        }

        _jsp_tag1.setKey("common.bbs.title.issue.time");
        _jsp_tag1.doStartTag();
        out.print((StringUtils.exportDate(bbs.getCreateTime(), "yyyy-MM-dd HH:mm")));
        pageContext.write(_jsp_string29, 0, _jsp_string29.length);
        _jsp_tag1.setKey("ins.confirm.delete");
        _jsp_tag1.doStartTag();
        pageContext.write(_jsp_string30, 0, _jsp_string30.length);
        _jsp_tag1.setKey("common.button.bbs.delete");
        _jsp_tag1.doStartTag();
        pageContext.write(_jsp_string31, 0, _jsp_string31.length);
      }
      pageContext.write(_jsp_string32, 0, _jsp_string32.length);
      if (_jsp_tag2 == null) {
        _jsp_tag2 = new org.apache.struts.taglib.html.RewriteTag();
        _jsp_tag2.setPageContext(pageContext);
        _jsp_tag2.setParent((javax.servlet.jsp.tagext.Tag) null);
      }

      _jsp_tag2.setPage("/bbs.do");
      int _jspEval54 = _jsp_tag2.doStartTag();
      int _jsp_endTagVar55 = _jsp_tag2.doEndTag();
      if (_jsp_endTagVar55 == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      pageContext.write(_jsp_string33, 0, _jsp_string33.length);
      out.print((id));
      pageContext.write(_jsp_string34, 0, _jsp_string34.length);
      out.print((id));
      pageContext.write(_jsp_string35, 0, _jsp_string35.length);
      out.print((StringUtils.exportString(request.getParameter("page"))));
      pageContext.write(_jsp_string36, 0, _jsp_string36.length);
      _jsp_tag2.setPage("/images/orange_arrow.gif");
      int _jspEval58 = _jsp_tag2.doStartTag();
      int _jsp_endTagVar59 = _jsp_tag2.doEndTag();
      if (_jsp_endTagVar59 == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      pageContext.write(_jsp_string37, 0, _jsp_string37.length);
      if (_jsp_tag1 == null) {
        _jsp_tag1 = new org.apache.struts.taglib.bean.MessageTag();
        _jsp_tag1.setPageContext(pageContext);
        _jsp_tag1.setParent((javax.servlet.jsp.tagext.Tag) null);
      }

      _jsp_tag1.setKey("common.text.bbs.reply");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string38, 0, _jsp_string38.length);
      _jsp_tag1.setKey("common.bbs.title.subject");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string39, 0, _jsp_string39.length);
      out.print((defaultTitle));
      pageContext.write(_jsp_string40, 0, _jsp_string40.length);
      _jsp_tag1.setKey("common.bbs.title.content");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string41, 0, _jsp_string41.length);
      _jsp_tag1.setKey("common.text.bbs.reply");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string42, 0, _jsp_string42.length);
      _jsp_tag2.setPage("/bbs/index2.jsp?page=");
      int _jspEval74 = _jsp_tag2.doStartTag();
      int _jsp_endTagVar75 = _jsp_tag2.doEndTag();
      if (_jsp_endTagVar75 == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      out.print((StringUtils.exportString(request.getParameter("page"))));
      pageContext.write(_jsp_string43, 0, _jsp_string43.length);
      _jsp_tag1.setKey("common.button.back");
      _jsp_tag1.doStartTag();
      pageContext.write(_jsp_string44, 0, _jsp_string44.length);

      // *********************************
      // end content
      // *********************************

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);

      // **********************************
      // footer
      // **********************************

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.include("/inc/footer.jsp");
      pageContext.write(_jsp_string45, 0, _jsp_string45.length);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      if (_jsp_tag0 != null) _jsp_tag0.release();
      if (_jsp_tag1 != null) _jsp_tag1.release();
      if (_jsp_tag2 != null) _jsp_tag2.release();
      if (_jsp_tag3 != null) _jsp_tag3.release();
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }
  }
コード例 #5
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.apache.jasper.runtime.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

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

      JobTracker tracker = (JobTracker) application.getAttribute("job.tracker");
      String trackerName = StringUtils.simpleHostname(tracker.getJobTrackerMachine());

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

      String jobId = request.getParameter("jobid");
      if (jobId == null) {
        out.println("<h2>Missing 'jobid'!</h2>");
        return;
      }
      JobID jobIdObj = JobID.forName(jobId);
      String kind = request.getParameter("kind");
      String cause = request.getParameter("cause");

      out.write("\n\n<html>\n<title>Hadoop ");
      out.print(jobId);
      out.write(" failures on ");
      out.print(trackerName);
      out.write("</title>\n<body>\n<h1>Hadoop <a href=\"jobdetails.jsp?jobid=");
      out.print(jobId);
      out.write('"');
      out.write('>');
      out.print(jobId);
      out.write("</a>\nfailures on <a href=\"jobtracker.jsp\">");
      out.print(trackerName);
      out.write("</a></h1>\n\n");

      printFailures(out, tracker, jobIdObj, kind, cause);

      out.write("\n\n<hr>\n<a href=\"jobtracker.jsp\">Go back to JobTracker</a><br>\n");

      out.println(ServletUtil.htmlFooter());

      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 {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }