jsp1_0002ejsp_jsp.java
上传用户:jhoneliu
上传日期:2022-07-31
资源大小:950k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. import javax.servlet.*;
  2. import javax.servlet.http.*;
  3. import javax.servlet.jsp.*;
  4. import org.apache.jasper.runtime.*;
  5. import java.sql.*;
  6. public class jsp1_0002ejsp_jsp extends HttpJspBase {
  7.   private static java.util.Vector _jspx_includes;
  8.   public java.util.List getIncludes() {
  9.     return _jspx_includes;
  10.   }
  11.   public void _jspService(HttpServletRequest request, HttpServletResponse response)
  12.         throws java.io.IOException, ServletException {
  13.     JspFactory _jspxFactory = null;
  14.     javax.servlet.jsp.PageContext pageContext = null;
  15.     HttpSession session = null;
  16.     ServletContext application = null;
  17.     ServletConfig config = null;
  18.     JspWriter out = null;
  19.     Object page = this;
  20.     JspWriter _jspx_out = null;
  21.     try {
  22.       _jspxFactory = JspFactory.getDefaultFactory();
  23.       response.setContentType("text/html; charset=gb2312");
  24.       pageContext = _jspxFactory.getPageContext(this, request, response,
  25.        "", true, 8192, true);
  26.       application = pageContext.getServletContext();
  27.       config = pageContext.getServletConfig();
  28.       session = pageContext.getSession();
  29.       out = pageContext.getOut();
  30.       _jspx_out = out;
  31.       out.write("rn");
  32.       out.write("<html>rn");
  33.       out.write("<head>rn");
  34.       out.write("<meta http-equiv="Content-Type" content="text/html; charset=gb2312">rn");
  35.       out.write("</head>rnrn");
  36.       out.write("<body>rn  ");
  37. if(session.getAttribute("userid")== null || session.getAttribute("userid").equals(""))
  38. {
  39.   response.sendRedirect("index.jsp");
  40. }
  41.       out.write("rn");
  42.       JspRuntimeLibrary.include(request, response, "head.jsp", out, true);
  43.       out.write("<br />");
  44.       out.write("<br />");
  45.       out.write("<br />");
  46.       out.write("<br />rn");
  47.       out.write("<form name="form1" method="post" action="DepAddSave.jsp" onSubmit="return check();">rn  ");
  48.       out.write("<table width="500" height="104" border="1" align="center" cellpadding="3" cellspacing="1">rn    ");
  49.       out.write("<caption>rn    新增部门资料rn    ");
  50.       out.write("</caption>rn    ");
  51.       out.write("<tr>rn      ");
  52.       out.write("<td width="301" height="50" >");
  53.       out.write("<div align="right">部门名称:");
  54.       out.write("</div>");
  55.       out.write("</td>rn      ");
  56.       out.write("<td width="446">");
  57.       out.write("<input name="depName" type="text" id="depName" maxlength="20">");
  58.       out.write("</td>rn    ");
  59.       out.write("</tr>rn    ");
  60.       out.write("<tr>rn      ");
  61.       out.write("<td colspan="2">");
  62.       out.write("<div align="center">rn        ");
  63.       out.write("<input type="submit" name="Submit" value="  保  存   ">rn      ");
  64.       out.write("</div>");
  65.       out.write("</td>rn    ");
  66.       out.write("</tr>rn  ");
  67.       out.write("</table>rn");
  68.       out.write("</form>rn");
  69.       JspRuntimeLibrary.include(request, response, "bottom.jsp", out, true);
  70.       out.write("rn");
  71.       out.write("</body>rn");
  72.       out.write("</html>rn");
  73.       out.write("<script language="javascript">rnfunction check()rn{rntif(form1.depName.value=="")rnt{rnttalert("请输入部门名称");rnttform1.depName.focus();rnttreturn false;rnt}rntreturn true;rnrn}rnrn");
  74.       out.write("</script>rn");
  75.     } catch (Throwable t) {
  76.       out = _jspx_out;
  77.       if (out != null && out.getBufferSize() != 0)
  78.         out.clearBuffer();
  79.       if (pageContext != null) pageContext.handlePageException(t);
  80.     } finally {
  81.       if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  82.     }
  83.   }
  84. }