presentchangeofemployeedata_0002ejsp_jsp.java
来自「100多M的J2EE培训内容」· Java 代码 · 共 231 行
JAVA
231 行
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.sql.*;
import humanresource.EmployeeInfoBean;
public class PresentChangeOfEmployeeData_0002ejsp_jsp extends HttpJspBase {
private static java.util.Vector _jspx_includes;
static {
_jspx_includes = new java.util.Vector(2);
_jspx_includes.add("/CompanyBanner.html");
_jspx_includes.add("/SiteNavigator.html");
}
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("\r\n");
out.write("<HTML>\r\n");
out.write("<HEAD>");
out.write("<TITLE>");
out.write("</TITLE>");
out.write("</HEAD>\r\n");
out.write("<BODY>\r\n");
out.write("<TABLE WIDTH=\"100%\" BORDER=\"0\" BGCOLOR=\"navy\">\n ");
out.write("<TR ALIGN=\"center\">\n ");
out.write("<TD>");
out.write("<FONT SIZE=\"7\" COLOR=\"yellow\">Husky World");
out.write("</FONT>");
out.write("</TD>\n ");
out.write("</TR>\n");
out.write("</TABLE>");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n\r\n");
humanresource.EmployeeInfoBean empInfo = null;
synchronized (request) {
empInfo = (humanresource.EmployeeInfoBean) pageContext.getAttribute("empInfo", PageContext.REQUEST_SCOPE);
if (empInfo == null){
try {
empInfo = (humanresource.EmployeeInfoBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "humanresource.EmployeeInfoBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "humanresource.EmployeeInfoBean", exc);
}
pageContext.setAttribute("empInfo", empInfo, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
out.write("<CENTER>\r\n ");
out.write("<FONT SIZE=\"5\" COLOR=\"navy\">\r\n Your New Information\r\n ");
out.write("</FONT>\r\n");
out.write("</CENTER>\r\n");
out.write("<TABLE WIDTH=\"100%\" BORDER=\"1\">\r\n");
int employeeID = empInfo.getId();
try {
/* Class.forName("COM.cloudscape.core.JDBCDriver").newInstance();
Connection conn =
DriverManager.getConnection("jdbc:cloudscape:c:\\HumanResourcesDB");
Statement statement = conn.createStatement();
String sql = "SELECT * FROM EMPLOYEEINFO WHERE ID = " + employeeID;*/
EmployeeInfoBean beanObj1=new EmployeeInfoBean();
ResultSet rs = beanObj1.queryPenPolicy(employeeID);
while(rs.next()){
out.write("\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Name:");
out.write("</TD>\r\n ");
out.write("<TD WIDTH=\"50%\">");
out.print( rs.getString("NAME") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Address:");
out.write("</TD>\r\n ");
out.write("<TD WIDTH=\"50%\">");
out.print( rs.getString("ADDRESS") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Phone Number:");
out.write("</TD>\r\n ");
out.write("<TD WIDTH=\"50%\">");
out.print( rs.getString("PHONE") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Work Status:");
out.write("</TD>\r\n ");
out.write("<TD WIDTH=\"50%\">");
out.print( rs.getString("WORKSTATUS") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Total Sick Days:");
out.write("</TD>\r\n ");
out.write("<TD> ");
out.print( rs.getString("TOTALSICKDAYS") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Taken Sick Days: ");
out.write("</TD>\r\n ");
out.write("<TD>");
out.print( rs.getString("TAKENSICKDAYS") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Total Personal Time(in hours): ");
out.write("</TD>\r\n ");
out.write("<TD>");
out.print( rs.getString("TOTALPERSONALTIME") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Taken Personal Time(in hours): ");
out.write("</TD>\r\n ");
out.write("<TD>");
out.print( rs.getString("TAKENPERSONALTIME") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Health Care Plan:");
out.write("</TD>\r\n ");
out.write("<TD WIDTH=\"50%\">");
out.print( rs.getString("HEALTHCAREPLAN") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Dental Plan:");
out.write("</TD>\r\n ");
out.write("<TD WIDTH=\"50%\">");
out.print( rs.getString("DENTALPLAN") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n ");
out.write("<TR>");
out.write("<TD ALIGN=\"right\" WIDTH=\"50%\">Vision Plan:");
out.write("</TD>\r\n ");
out.write("<TD WIDTH=\"50%\">");
out.print( rs.getString("VISIONPLAN") );
out.write("</TD>\r\n ");
out.write("</TR>\r\n");
}//end while loop
} // end try block
catch (Exception e) {};
out.write("\r\n");
out.write("</TABLE>\r\n");
out.write("<BODY ALINK=\"yellow\" VLINK=\"yellow\" LINK=\"yellow\">\n");
out.write("<TABLE WIDTH=\"100%\" BORDER=\"0\" BGCOLOR=\"navy\">\n ");
out.write("<TR ALIGN=\"center\">\n ");
out.write("<TD COLSPAN=2>");
out.write("<FONT SIZE=\"4\" COLOR=\"yellow\">Site Navigator");
out.write("</FONT>");
out.write("</TD>\n ");
out.write("</TR>\n ");
out.write("<TR ALIGN=\"center\">\n ");
out.write("<TD>");
out.write("<A HREF=\"PresentCompanyPolicies.jsp\">\n Look at Company Policies");
out.write("</A>\n ");
out.write("</TD>\n ");
out.write("<TD>");
out.write("<A HREF=\"PersonalInfo.html\">\n Look At Personal Information");
out.write("</A>\n ");
out.write("</TD>\n ");
out.write("</TR>\n ");
out.write("<TR ALIGN=\"center\">\n ");
out.write("<TD>");
out.write("<A HREF=\"InputEmployeeInfo.html\">\n Change Employee Information");
out.write("</A>");
out.write("</FONT>\n ");
out.write("</TD>\n ");
out.write("<TD>");
out.write("<A HREF=\"PresentCompanyHealthCareInfo.jsp\">\n Look At Health Care Options");
out.write("</A>\n ");
out.write("</TD>\n ");
out.write("</TR>\n ");
out.write("<TR ALIGN=\"center\">\n ");
out.write("<TD COLSPAN=\"2\">");
out.write("<A HREF=\"HumanResources.html\">\n Home Page");
out.write("</A>\n ");
out.write("</TD>\n ");
out.write("</TR>\n");
out.write("</TABLE>\n");
out.write("</BODY>");
out.write("\r\n");
out.write("</BODY>\r\n");
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);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?