📄 addemployeetodept_0002ejsp_jsp.java
字号:
import com.jspdev.ch17.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class addEmployeeToDept_0002ejsp_jsp extends HttpJspBase {
// begin [file="/addEmployeeToDept.jsp";from=(5,0);to=(5,85)]
// end
static {
}
public addEmployeeToDept_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
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;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/addEmployeeToDept.jsp";from=(0,86);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(1,58);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(2,58);to=(3,0)]
out.write("\r\n");
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(3,60);to=(4,0)]
out.write("\r\n");
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(4,60);to=(5,0)]
out.write("\r\n");
// end
// begin [file="/addEmployeeToDept.jsp";from=(5,0);to=(5,85)]
com.jspdev.ch17.EmployeeBean employeeBean = null;
boolean _jspx_specialemployeeBean = false;
synchronized (session) {
employeeBean= (com.jspdev.ch17.EmployeeBean)
pageContext.getAttribute("employeeBean",PageContext.SESSION_SCOPE);
if ( employeeBean == null ) {
_jspx_specialemployeeBean = true;
try {
employeeBean = (com.jspdev.ch17.EmployeeBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.jspdev.ch17.EmployeeBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"com.jspdev.ch17.EmployeeBean", exc);
}
pageContext.setAttribute("employeeBean", employeeBean, PageContext.SESSION_SCOPE);
}
}
if(_jspx_specialemployeeBean == true) {
// end
// begin [file="/addEmployeeToDept.jsp";from=(5,0);to=(5,85)]
}
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(5,85);to=(6,0)]
out.write("\r\n");
// end
// begin [file="/addEmployeeToDept.jsp";from=(6,0);to=(6,64)]
/* ---- c:set ---- */
org.apache.taglibs.standard.tag.el.core.SetTag _jspx_th_c_set_0 = new org.apache.taglibs.standard.tag.el.core.SetTag();
_jspx_th_c_set_0.setPageContext(pageContext);
_jspx_th_c_set_0.setParent(null);
_jspx_th_c_set_0.setVar("employees");
_jspx_th_c_set_0.setValue("${employeeBean.noDeptEmployees}");
try {
int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag();
if (_jspx_eval_c_set_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
try {
if (_jspx_eval_c_set_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = pageContext.pushBody();
_jspx_th_c_set_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_c_set_0.doInitBody();
}
do {
// end
// begin [file="/addEmployeeToDept.jsp";from=(6,0);to=(6,64)]
} while (_jspx_th_c_set_0.doAfterBody() == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
} finally {
if (_jspx_eval_c_set_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
out = pageContext.popBody();
}
}
if (_jspx_th_c_set_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
} finally {
_jspx_th_c_set_0.release();
}
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(6,64);to=(7,0)]
out.write("\r\n");
// end
// begin [file="/addEmployeeToDept.jsp";from=(7,0);to=(7,25)]
/* ---- html:html ---- */
org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_0 = new org.apache.struts.taglib.html.HtmlTag();
_jspx_th_html_html_0.setPageContext(pageContext);
_jspx_th_html_html_0.setParent(null);
_jspx_th_html_html_0.setLocale(true);
try {
int _jspx_eval_html_html_0 = _jspx_th_html_html_0.doStartTag();
if (_jspx_eval_html_html_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
throw new JspTagException("Since tag handler class org.apache.struts.taglib.html.HtmlTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
if (_jspx_eval_html_html_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(7,25);to=(14,2)]
out.write("\r\n <head>\r\n<title>将雇员添加到部门</title>\r\n</head>\r\n<body>\r\n<center>\r\n <h1>在部门中选择要添加的雇员:</h1>\r\n ");
// end
// begin [file="/addEmployeeToDept.jsp";from=(14,2);to=(14,16)]
/* ---- html:errors ---- */
org.apache.struts.taglib.html.ErrorsTag _jspx_th_html_errors_0 = new org.apache.struts.taglib.html.ErrorsTag();
_jspx_th_html_errors_0.setPageContext(pageContext);
_jspx_th_html_errors_0.setParent(_jspx_th_html_html_0);
try {
int _jspx_eval_html_errors_0 = _jspx_th_html_errors_0.doStartTag();
if (_jspx_eval_html_errors_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
throw new JspTagException("Since tag handler class org.apache.struts.taglib.html.ErrorsTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
if (_jspx_eval_html_errors_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
// end
// begin [file="/addEmployeeToDept.jsp";from=(14,2);to=(14,16)]
} while (_jspx_th_html_errors_0.doAfterBody() == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
}
if (_jspx_th_html_errors_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
} finally {
_jspx_th_html_errors_0.release();
}
// end
// HTML // begin [file="/addEmployeeToDept.jsp";from=(14,16);to=(19,5)]
out.write("\r\n <table align=\"center\" bgcolor=\"#008800\" border=\"0\" cellspacing=\"2\" cellpadding=\"5\">\r\n <tr bgcolor=\"#cccccc\">\r\n <td>ID</td><td>姓名</td><td>添加</td>\r\n </tr>\r\n ");
// end
// begin [file="/addEmployeeToDept.jsp";from=(19,5);to=(19,47)]
/* ---- logic:iterate ---- */
org.apache.struts.taglib.logic.IterateTag _jspx_th_logic_iterate_0 = new org.apache.struts.taglib.logic.IterateTag();
_jspx_th_logic_iterate_0.setPageContext(pageContext);
_jspx_th_logic_iterate_0.setParent(_jspx_th_html_html_0);
_jspx_th_logic_iterate_0.setId("emps");
_jspx_th_logic_iterate_0.setName("employees");
try {
int _jspx_eval_logic_iterate_0 = _jspx_th_logic_iterate_0.doStartTag();
if (_jspx_eval_logic_iterate_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
try {
if (_jspx_eval_logic_iterate_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = pageContext.pushBody();
_jspx_th_logic_iterate_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
_jspx_th_logic_iterate_0.doInitBody();
}
do {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -