checkPayRoll.jsp
<%--Client enters the employee whos data they wish to check--%>
checkPayRoll
<%@ page import= "java.util.*" %> <%@ page import= "com.EmployeeObject4"%> <%@ page import= "java.sql.*"%> <%@ page import= "com.PrintToFile"%> <%@ page import= "java.io.*"%> <%@ page import= "com.ConnectionPool2"%>
Check Past Payroll Data
<%--If the user enter this page with out first logging on they are sent to the login page --%> <%@ include file="checkCompany.jsp" %> <% String permission = (String)session.getAttribute("Permission"); if(permission.equals("1")) { %>
<% } Connection connect9 = ConnectionPool2.getConnection(); System.out.println("checkPayRoll top3" + company); String query = "select FirstName, NIC from Perse3 WHERE CompanyName like '"+company+"'"; Statement statement = connect9.createStatement(); System.out.println("checkPayRoll top4"); ResultSet resultSet; ArrayList arrayList = new ArrayList(); try{ System.out.println("checkPayRoll top4.5"); resultSet = statement.executeQuery( query ); System.out.println("checkPayRoll top4.6"); System.out.println("checkPayRoll top4.8"); //First the data is removed from the result set and placed into an employee object. %>
<% while( resultSet.next()) { String A = resultSet.getString(1); String B = resultSet.getString(2); %>
>
<%= A%>
>
<%= B %>
>
<%}%>
<% } catch(Exception e) { System.out.println("Company blank"); } %>