AddNewEmployee_0002ejsp_jsp.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:3k
源码类别:
Java编程
开发平台:
Java
- import javax.servlet.*;
- import javax.servlet.http.*;
- import javax.servlet.jsp.*;
- import org.apache.jasper.runtime.*;
- public class AddNewEmployee_0002ejsp_jsp extends HttpJspBase {
- private static java.util.Vector _jspx_includes;
- public java.util.List getIncludes() {
- return _jspx_includes;
- }
- 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=GBK");
- 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("rn");
- out.write("<HTML>rn");
- out.write("<HEAD>");
- out.write("<TITLE>Update DB With New Employee Information");
- out.write("</TITLE>");
- out.write("</HEAD>rn");
- out.write("<BODY>rn");
- humanresource.NewEmployeeBean newEmployee = null;
- synchronized (request) {
- newEmployee = (humanresource.NewEmployeeBean) pageContext.getAttribute("newEmployee", PageContext.REQUEST_SCOPE);
- if (newEmployee == null){
- try {
- newEmployee = (humanresource.NewEmployeeBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "humanresource.NewEmployeeBean");
- } catch (ClassNotFoundException exc) {
- throw new InstantiationException(exc.getMessage());
- } catch (Exception exc) {
- throw new ServletException("Cannot create bean of class " + "humanresource.NewEmployeeBean", exc);
- }
- pageContext.setAttribute("newEmployee", newEmployee, PageContext.REQUEST_SCOPE);
- }
- }
- out.write("rn");
- JspRuntimeLibrary.introspect(pageContext.findAttribute("newEmployee"), request);
- out.write("rn");
- newEmployee.updateDatabase();
- out.write("rn");
- if (true) {
- pageContext.forward("PresentNewEmployeeInfo.jsp");
- return;
- }
- out.write("rn");
- out.write("</BODY>rn");
- out.write("</HTML>");
- } 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);
- }
- }
- }