<%-- Document : register Created on : Dec 9, 2013, 12:49:49 PM Author : aqfaridi --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@page import="connection.*,java.sql.*,java.util.ArrayList,java.util.List" %> CodeShare <% String User =(String) session.getAttribute("username"); // out.print(User); if(User != null) {%> <%@include file="header1.jsp" %> <% } else {%> <%@ include file="header.jsp" %> <% } %>
<% Config c = new Config(); Connection con = c.getcon(); String res = request.getParameter("res"); int id = Integer.parseInt(request.getParameter("id")); int start = id; int end = start + 19; Statement st = con.createStatement(); String qry = "SELECT * FROM "+res; ResultSet rs = st.executeQuery(qry); rs.last(); int totalrows = rs.getRow(); rs.beforeFirst(); if(totalrows!=0) { out.println(" <% int i = start; %> <% rs.absolute(start); do { %> <% i++; }while(rs.next() && i<=end); } else out.println("

No Result Found

"); %>
S No. Problem Code Problem Name Category
<%=i%> <%=rs.getString("problemcode")%> &res=<%=res%> " > <%=rs.getString("problemname")%> <%=rs.getString("category")%>




<%@include file="footer.jsp" %>