public void _jspService(
      javax.servlet.http.HttpServletRequest request,
      javax.servlet.http.HttpServletResponse response)
      throws java.io.IOException, javax.servlet.ServletException {
    javax.servlet.http.HttpSession session = request.getSession(true);
    com.caucho.server.webapp.Application _jsp_application = _caucho_getApplication();
    javax.servlet.ServletContext application = _jsp_application;
    com.caucho.jsp.PageContextImpl pageContext =
        com.caucho.jsp.QJspFactory.allocatePageContext(
            this, _jsp_application, request, response, null, session, 8192, true, false);
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html");
    try {
      uk.ac.dundee.computing.stewarttaylor.UserBean userBean;
      synchronized (session) {
        userBean = (uk.ac.dundee.computing.stewarttaylor.UserBean) session.getAttribute("userBean");
        if (userBean == null) {
          userBean = new uk.ac.dundee.computing.stewarttaylor.UserBean();
          session.setAttribute("userBean", userBean);
        }
      }
      out.write(_jsp_string0, 0, _jsp_string0.length);
      uk.ac.dundee.computing.stewarttaylor.UserBean userBean2;
      synchronized (session) {
        userBean2 =
            (uk.ac.dundee.computing.stewarttaylor.UserBean) session.getAttribute("userBean2");
        if (userBean2 == null) {
          userBean2 = new uk.ac.dundee.computing.stewarttaylor.UserBean();
          session.setAttribute("userBean2", userBean2);
        }
      }
      out.write(_jsp_string1, 0, _jsp_string1.length);

      uk.ac.dundee.computing.stewarttaylor.UserBean uBean2 =
          (uk.ac.dundee.computing.stewarttaylor.UserBean) session.getAttribute("userBean");
      String sName = uBean2.getUsername();

      out.write(_jsp_string2, 0, _jsp_string2.length);
      out.print(sName);
      out.write(_jsp_string3, 0, _jsp_string3.length);
      out.print(sName);
      out.write(_jsp_string4, 0, _jsp_string4.length);
      uk.ac.dundee.computing.stewarttaylor.MessageBean msgBean;
      synchronized (session) {
        msgBean =
            (uk.ac.dundee.computing.stewarttaylor.MessageBean) session.getAttribute("msgBean");
        if (msgBean == null) {
          msgBean = new uk.ac.dundee.computing.stewarttaylor.MessageBean();
          session.setAttribute("msgBean", msgBean);
        }
      }
      out.write(_jsp_string5, 0, _jsp_string5.length);

      try {

        String[] names = msgBean.getUsername();
        String[] dates = msgBean.getDate();
        String[] messages = msgBean.getMessage();
        String[] images = msgBean.getImage();
        boolean[] canDelete = msgBean.getCanDelete();
        int[] id = msgBean.getID();

        for (int i = 0; i < names.length; i++) {

          out.write(_jsp_string6, 0, _jsp_string6.length);
          out.println(names[i]);
          out.write(_jsp_string3, 0, _jsp_string3.length);
          out.println(names[i]);
          out.write(_jsp_string7, 0, _jsp_string7.length);

          if (canDelete[i] == true) {

            out.write(_jsp_string8, 0, _jsp_string8.length);
            out.println(id[i]);
            out.write(_jsp_string9, 0, _jsp_string9.length);
          }

          out.write(_jsp_string10, 0, _jsp_string10.length);
          out.println(images[i]);
          out.write(_jsp_string11, 0, _jsp_string11.length);
          out.println(dates[i]);
          out.write(_jsp_string12, 0, _jsp_string12.length);
          out.println(messages[i]);
          out.write(_jsp_string13, 0, _jsp_string13.length);
        }
      } catch (Exception E) {
        out.println("<h3> No Posts Retrieved</h3>");
      }

      out.write(_jsp_string14, 0, _jsp_string14.length);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      com.caucho.jsp.QJspFactory.freePageContext(pageContext);
    }
  }
Example #2
0
  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);
    }
  }