<%@page import="java.sql.SQLException"%> <%@page import="java.sql.ResultSet"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Statement"%> <%@page import="java.sql.Connection"%> <%-- This line is necessary of you want to handle session in a JSP code by yourself --%> <%@page language="java" session="false" %> Contact

50%off use coupon code "big61" and get extra 33% off on orders above rs 2,229

  • Recently viewed
  • <% HttpSession sess = request.getSession(false); if(sess == null|| sess.getAttribute("username")== null) { %>
  • Contact
  • <%} else { %>
  • Welcome <%=sess.getAttribute("username") %>
  • logout
  • <%}%>
<% if (sess==null|| sess.getAttribute("username") == null) { %> <% } %>
    • Your cart : <% HttpSession sess_emp = request.getSession(true); if(sess_emp.getAttribute("shopping") != null) { %>

      <%=sess_emp.getAttribute("shopping")%>

      <%} else { %>

      empty

    • <%}%>
<% Connection conn = null; Statement stmt = null; try { Class.forName("net.ucanaccess.jdbc.UcanaccessDriver"); conn=DriverManager.getConnection("jdbc:ucanaccess:////C:\\Users\\faheem\\Documents\\NetBeansProjects\\WebApplication2\\Database1.accdb"); stmt = conn.createStatement(); String sql; sql = "SELECT * FROM Database1"; ResultSet rs = stmt.executeQuery(sql); //STEP 5: Extract data from result set while(rs.next()) { String name1 = rs.getString("Username1"); String name2 = rs.getString("Username2"); String email = rs.getString("Email"); %> <% } rs.close(); stmt.close(); conn.close(); } catch(ClassNotFoundException e){ } catch (SQLException e) { } finally{ //finally block used to close resources try{ if(stmt!=null) stmt.close(); }catch(SQLException se2){ }// nothing we can do try{ if(conn!=null) conn.close(); }catch(SQLException se){ }//end finally try }//end try %>

Total number of users

First Name

Last Name

Email

<%=name1%> <%=name2%> <%=email%>