PresentTimeOffData_jsp.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:4k
源码类别:
Java编程
开发平台:
Java
- package org.apache.jsp;
- import javax.servlet.*;
- import javax.servlet.http.*;
- import javax.servlet.jsp.*;
- import org.apache.jasper.runtime.*;
- import java.sql.*;
- import humanresource.EmployeeInfoBean;
- public class PresentTimeOffData_jsp extends HttpJspBase {
- int employeeID;
- 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>Your Time Off Data");
- out.write("</TITLE>");
- out.write("</HEAD>rn");
- out.write("<BODY>rnrn");
- out.write("rn");
- out.write("rnrn");
- out.write("rnrn");
- out.write("<H1 ALIGN="center">Your Current Time Off Status");
- out.write("</H1>rnrn");
- out.write("<TABLE WIDTH="100%" BORDER="1">rn");
- /*employeeID = Integer.valueOf(request.getParameter("id")).intValue();
- 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;
- ResultSet rs = statement.executeQuery(sql);*/
- EmployeeInfoBean beanObj2=new EmployeeInfoBean();
- employeeID = Integer.valueOf(request.getParameter("id")).intValue();
- ResultSet rs=beanObj2.queryPenPolicy(employeeID);
- rs.next();
- out.write("rn ");
- out.write("<TR>");
- out.write("<TD ALIGN="right" WIDTH="50%">Employee Name:");
- out.write("</TD>rn ");
- out.write("<TD WIDTH="50%">");
- out.print( rs.getString("NAME") );
- out.write("</TD>rn ");
- out.write("</TR>rn ");
- out.write("<TR>");
- out.write("<TD ALIGN="right">Total Sick Days:");
- out.write("</TD>rn ");
- out.write("<TD> ");
- out.print( rs.getString("TOTALSICKDAYS") );
- out.write("</TD>rn ");
- out.write("</TR>rn ");
- out.write("<TR>");
- out.write("<TD ALIGN="right">Taken Sick Days: ");
- out.write("</TD>rn ");
- out.write("<TD>");
- out.print( rs.getString("TAKENSICKDAYS") );
- out.write("</TD>rn ");
- out.write("</TR>rn ");
- out.write("<TR>");
- out.write("<TD ALIGN="right">Total Personal Time (in hours): ");
- out.write("</TD>rn ");
- out.write("<TD>");
- out.print( rs.getString("TOTALPERSONALTIME") );
- out.write("</TD>rn ");
- out.write("</TR>rn ");
- out.write("<TR>");
- out.write("<TD ALIGN="right">Taken Personal Time (in hours): ");
- out.write("</TD>rn ");
- out.write("<TD>");
- out.print( rs.getString("TAKENPERSONALTIME") );
- out.write("</TD>rn ");
- out.write("</TR>rn");
- out.write("</TABLE>rn");
- out.write("<BR>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);
- }
- }
- }