示例#1
0
 public void _jspService(
     javax.servlet.http.HttpServletRequest request,
     javax.servlet.http.HttpServletResponse response)
     throws java.io.IOException, javax.servlet.ServletException {
   com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
   javax.servlet.ServletContext application = _jsp_application;
   com.caucho.jsp.PageContextImpl pageContext =
       _jsp_application
           .getJspApplicationContext()
           .allocatePageContext(
               this, _jsp_application, request, response, null, null, 8192, true, false);
   javax.servlet.jsp.PageContext _jsp_parentContext = pageContext;
   javax.servlet.jsp.JspWriter out = pageContext.getOut();
   final javax.el.ELContext _jsp_env = pageContext.getELContext();
   javax.servlet.ServletConfig config = getServletConfig();
   javax.servlet.Servlet page = this;
   response.setContentType("text/html;charset=UTF-8");
   request.setCharacterEncoding("UTF-8");
   try {
     out.write(_jsp_string0, 0, _jsp_string0.length);
   } catch (java.lang.Throwable _jsp_e) {
     pageContext.handlePageException(_jsp_e);
   } finally {
     _jsp_application.getJspApplicationContext().freePageContext(pageContext);
   }
 }
  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.WebApp _jsp_application = _caucho_getApplication();
    javax.servlet.ServletContext application = _jsp_application;
    com.caucho.jsp.PageContextImpl pageContext = _jsp_application.getJspApplicationContext().allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);
    javax.servlet.jsp.PageContext _jsp_parentContext = pageContext;
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html;charset=EUC-KR");
    request.setCharacterEncoding("EUC-KR");
    try {
      out.write(_jsp_string0, 0, _jsp_string0.length);
      
	String filename = request.getParameter("filename");
	String downname = request.getParameter("downname");
	FormDataDownload formData = new FormDataDownload(response, new File(filename), null, null);
	try
	{
		formData.download();
	}catch(FileNotFoundException e)
	{
		
      out.write(_jsp_string1, 0, _jsp_string1.length);
      out.print(( e ));
      out.write(_jsp_string2, 0, _jsp_string2.length);
      
		return;
	}catch(IOException e)
	{
		
      out.write(_jsp_string3, 0, _jsp_string3.length);
      out.print(( e ));
      out.write(_jsp_string4, 0, _jsp_string4.length);
      
		return;
	}catch(Exception e)
	{
		System.out.println("Exception Error~~" + e);
	}

      out.write('\n');
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      _jsp_application.getJspApplicationContext().freePageContext(pageContext);
    }
  }
  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.WebApp _jsp_application = _caucho_getApplication();
    com.caucho.jsp.PageContextImpl pageContext =
        _jsp_pageManager.allocatePageContext(
            this, _jsp_application, request, response, null, session, 8192, true, false);

    TagState _jsp_state = null;

    try {
      _jspService(request, response, pageContext, _jsp_application, session, _jsp_state);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      _jsp_pageManager.freePageContext(pageContext);
    }
  }
  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.WebApp _jsp_application = _caucho_getApplication();
    javax.servlet.ServletContext application = _jsp_application;
    com.caucho.jsp.PageContextImpl pageContext =
        _jsp_application
            .getJspApplicationContext()
            .allocatePageContext(
                this, _jsp_application, request, response, null, session, 8192, true, false);
    javax.servlet.jsp.PageContext _jsp_parentContext = pageContext;
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html");
    try {

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

      String scmid = "";
      String scmnm = "";
      String usertype = "";
      String usergroup = "";
      // String scmsubids = "";
      String _adminid = "";
      String _adminname = "";
      String _admingroup = "";
      String _apessid = "";
      String _apessname = "";

      try {
        scmid = (String) session.getAttribute("scmid");
        _adminid = (String) session.getAttribute("adminid");

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

        _adminname = (String) session.getAttribute("adminname");

        _apessid = (String) session.getAttribute("apessid");
        _apessname = (String) session.getAttribute("apessname");

        scmnm = (String) session.getAttribute("scmnm");

        usertype = (String) session.getAttribute("usertype");
        if (usertype == null) usertype = "";

        usergroup = (String) session.getAttribute("usergroup");
        if (usergroup == null) usergroup = "";

        // scmsubids = (String) session.getAttribute("scmsubids");
        // session.setMaxInactiveInterval(60*60);

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

      out.write('\n');

      String id = request.getParameter("id");

      out.write(_jsp_string0, 0, _jsp_string0.length);
      out.print((id));
      out.write(_jsp_string1, 0, _jsp_string1.length);
      out.print((id));
      out.write(_jsp_string2, 0, _jsp_string2.length);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      _jsp_application.getJspApplicationContext().freePageContext(pageContext);
    }
  }
  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, "/error.jsp", session, 8192, true);
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html");
    try {
      out.write(_jsp_string0, 0, _jsp_string0.length);
      out.print(((String) session.getAttribute("user")));
      out.write(_jsp_string1, 0, _jsp_string1.length);
      out.print(((String) session.getAttribute("db")));
      out.write(_jsp_string2, 0, _jsp_string2.length);

      // get all tables in the database
      ConDB dbcon = (ConDB) session.getAttribute("dbcon");
      Connection conn = dbcon.get();
      int total_rec = 0;
      int total_table = 0;
      String sql = "show tables";
      PreparedStatement pstm = null;
      ResultSet rs = null;
      try {
        pstm = conn.prepareStatement(sql);
        rs = pstm.executeQuery();
      } catch (SQLException e) {
        out.println(e);
      }

      // count the records of each table
      while (rs.next()) {
        String curr_tb = rs.getString(1);
        int curr_rec = 0;
        PreparedStatement pstm_rec = null;
        ResultSet rs_rec = null;
        sql = "select count(*) from " + curr_tb;

        try {
          pstm_rec = conn.prepareStatement(sql);
          rs_rec = pstm_rec.executeQuery();
        } catch (SQLException e) {
          out.println(e);
        }

        try {
          if (rs_rec.next()) {
            curr_rec = rs_rec.getInt(1);
            total_rec += curr_rec;
          }
        } catch (SQLException e) {
          out.println(e.getErrorCode() + "---" + e.getSQLState());
        }

        total_table++;

        out.write(_jsp_string3, 0, _jsp_string3.length);
        out.print((total_table & 1));
        out.write(_jsp_string4, 0, _jsp_string4.length);
        out.print((curr_tb));
        out.write(_jsp_string5, 0, _jsp_string5.length);
        out.print((curr_tb));
        out.write(_jsp_string6, 0, _jsp_string6.length);
        out.print((curr_tb));
        out.write(_jsp_string7, 0, _jsp_string7.length);
        out.print((curr_tb));
        out.write(_jsp_string8, 0, _jsp_string8.length);
        out.print((curr_tb));
        out.write(_jsp_string9, 0, _jsp_string9.length);
        out.print((curr_rec));
        out.write(_jsp_string10, 0, _jsp_string10.length);
      }

      out.write(_jsp_string11, 0, _jsp_string11.length);
      out.print((total_table));
      out.write(_jsp_string12, 0, _jsp_string12.length);
      out.print((total_rec));
      out.write(_jsp_string13, 0, _jsp_string13.length);
      out.print((session.getAttribute("db")));
      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);
    }
  }
  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);
    }
  }
示例#7
0
  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.WebApp _jsp_application = _caucho_getApplication();
    javax.servlet.ServletContext application = _jsp_application;
    com.caucho.jsp.PageContextImpl pageContext =
        _jsp_application
            .getJspApplicationContext()
            .allocatePageContext(
                this, _jsp_application, request, response, null, session, 8192, true, false);
    javax.servlet.jsp.PageContext _jsp_parentContext = pageContext;
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    response.setContentType("text/html; charset=utf-8");
    request.setCharacterEncoding("UTF-8");
    dms.tag.CategorySelectTag _jsp_CategorySelectTag_0 = null;
    dms.tag.CitySelectTag _jsp_CitySelectTag_1 = null;
    dms.tag.DomainSelectTag _jsp_DomainSelectTag_2 = null;
    dms.tag.ServiceSelectTag _jsp_ServiceSelectTag_3 = null;
    dms.tag.GroupSelectTag _jsp_GroupSelectTag_4 = null;
    org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag _jsp_FormatDateTag_5 = null;
    try {
      out.write(_jsp_string0, 0, _jsp_string0.length);
      _caucho_expr_0.print(out, _jsp_env, false);
      out.write(_jsp_string1, 0, _jsp_string1.length);
      if (_jsp_CategorySelectTag_0 == null) {
        _jsp_CategorySelectTag_0 = new dms.tag.CategorySelectTag();
        _jsp_CategorySelectTag_0.setPageContext(pageContext);
        _jsp_CategorySelectTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
        _jsp_CategorySelectTag_0.setName("category");
      }

      _jsp_CategorySelectTag_0.setCatId(new java.lang.Long(_caucho_expr_1.evalLong(_jsp_env)));
      _jsp_CategorySelectTag_0.doStartTag();
      out.write(_jsp_string2, 0, _jsp_string2.length);
      if (_jsp_CitySelectTag_1 == null) {
        _jsp_CitySelectTag_1 = new dms.tag.CitySelectTag();
        _jsp_CitySelectTag_1.setPageContext(pageContext);
        _jsp_CitySelectTag_1.setParent((javax.servlet.jsp.tagext.Tag) null);
        _jsp_CitySelectTag_1.setName("city");
      }

      _jsp_CitySelectTag_1.setCityId(new java.lang.Long(_caucho_expr_2.evalLong(_jsp_env)));
      _jsp_CitySelectTag_1.doStartTag();
      out.write(_jsp_string3, 0, _jsp_string3.length);
      if (_jsp_DomainSelectTag_2 == null) {
        _jsp_DomainSelectTag_2 = new dms.tag.DomainSelectTag();
        _jsp_DomainSelectTag_2.setPageContext(pageContext);
        _jsp_DomainSelectTag_2.setParent((javax.servlet.jsp.tagext.Tag) null);
        _jsp_DomainSelectTag_2.setName("siteId");
      }

      _jsp_DomainSelectTag_2.setDomainId(new java.lang.Long(_caucho_expr_3.evalLong(_jsp_env)));
      _jsp_DomainSelectTag_2.doStartTag();
      out.write(_jsp_string4, 0, _jsp_string4.length);
      if (_jsp_ServiceSelectTag_3 == null) {
        _jsp_ServiceSelectTag_3 = new dms.tag.ServiceSelectTag();
        _jsp_ServiceSelectTag_3.setPageContext(pageContext);
        _jsp_ServiceSelectTag_3.setParent((javax.servlet.jsp.tagext.Tag) null);
        _jsp_ServiceSelectTag_3.setName("service");
      }

      _jsp_ServiceSelectTag_3.setService(new java.lang.Long(_caucho_expr_4.evalLong(_jsp_env)));
      _jsp_ServiceSelectTag_3.doStartTag();
      out.write(_jsp_string5, 0, _jsp_string5.length);
      if (_jsp_GroupSelectTag_4 == null) {
        _jsp_GroupSelectTag_4 = new dms.tag.GroupSelectTag();
        _jsp_GroupSelectTag_4.setPageContext(pageContext);
        _jsp_GroupSelectTag_4.setParent((javax.servlet.jsp.tagext.Tag) null);
        _jsp_GroupSelectTag_4.setName("group");
      }

      _jsp_GroupSelectTag_4.setGroup(new java.lang.Long(_caucho_expr_5.evalLong(_jsp_env)));
      _jsp_GroupSelectTag_4.doStartTag();
      out.write(_jsp_string6, 0, _jsp_string6.length);
      _caucho_expr_6.print(out, _jsp_env, false);
      out.write(_jsp_string7, 0, _jsp_string7.length);
      if (_jsp_FormatDateTag_5 == null) {
        _jsp_FormatDateTag_5 = new org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag();
        _jsp_FormatDateTag_5.setPageContext(pageContext);
        _jsp_FormatDateTag_5.setParent((javax.servlet.jsp.tagext.Tag) null);
        _jsp_FormatDateTag_5.setPattern("yy-MM-dd HH:mm:ss");
      }

      _jsp_FormatDateTag_5.setValue((java.util.Date) _caucho_expr_7.evalObject(_jsp_env));
      _jsp_FormatDateTag_5.doEndTag();
      out.write(_jsp_string8, 0, _jsp_string8.length);
      _jsp_FormatDateTag_5.setValue((java.util.Date) _caucho_expr_8.evalObject(_jsp_env));
      _jsp_FormatDateTag_5.doEndTag();
      out.write(_jsp_string9, 0, _jsp_string9.length);
      _caucho_expr_9.print(out, _jsp_env, false);
      out.write(_jsp_string10, 0, _jsp_string10.length);
      _caucho_expr_10.print(out, _jsp_env, false);
      out.write(_jsp_string11, 0, _jsp_string11.length);
      _caucho_expr_11.print(out, _jsp_env, false);
      out.write(_jsp_string12, 0, _jsp_string12.length);
      _caucho_expr_12.print(out, _jsp_env, false);
      out.write(_jsp_string13, 0, _jsp_string13.length);
      _caucho_expr_13.print(out, _jsp_env, false);
      out.write(_jsp_string14, 0, _jsp_string14.length);
      _caucho_expr_14.print(out, _jsp_env, false);
      out.write(_jsp_string15, 0, _jsp_string15.length);
      if (_caucho_expr_15.evalBoolean(_jsp_env)) {
        out.write(_jsp_string16, 0, _jsp_string16.length);
      } else {
        out.write(_jsp_string17, 0, _jsp_string17.length);
      }
      out.write(_jsp_string18, 0, _jsp_string18.length);
      _caucho_expr_16.print(out, _jsp_env, false);
      out.write(_jsp_string19, 0, _jsp_string19.length);
      _caucho_expr_17.print(out, _jsp_env, false);
      out.write(_jsp_string20, 0, _jsp_string20.length);
      _caucho_expr_18.print(out, _jsp_env, false);
      out.write(_jsp_string21, 0, _jsp_string21.length);
      _caucho_expr_19.print(out, _jsp_env, false);
      out.write(_jsp_string22, 0, _jsp_string22.length);
      if (_caucho_expr_20.evalBoolean(_jsp_env)) {
        out.write(_jsp_string23, 0, _jsp_string23.length);
      } else {
        out.write(_jsp_string24, 0, _jsp_string24.length);
      }
      out.write(_jsp_string25, 0, _jsp_string25.length);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      if (_jsp_CategorySelectTag_0 != null) _jsp_CategorySelectTag_0.release();
      if (_jsp_CitySelectTag_1 != null) _jsp_CitySelectTag_1.release();
      if (_jsp_DomainSelectTag_2 != null) _jsp_DomainSelectTag_2.release();
      if (_jsp_ServiceSelectTag_3 != null) _jsp_ServiceSelectTag_3.release();
      if (_jsp_GroupSelectTag_4 != null) _jsp_GroupSelectTag_4.release();
      if (_jsp_FormatDateTag_5 != null) _jsp_FormatDateTag_5.release();
      _jsp_application.getJspApplicationContext().freePageContext(pageContext);
    }
  }