<%@ page language="java" %> <%@ page import="java.sql.*" %> <%! public int nullIntconve" name="description">

showing missing expression.pls correct it <%@ page contentType="text/html;charset=windows-1252"%> <%@ page language="java" %> <%@ page import="java.sql.*" %> <%! public int nullIntconvert(String str){ int num=0; if(str==null) { str="0"; } else if((str.trim()).equals("null")) { str="0"; } else if(str.equals("")) { str="0"; } try{ num=Integer.parseInt(str); } catch(Exception e) { } return num; } %> <% Connection conn = null; Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); conn = DriverManager.getConnection("jdbc:oracle:thin:@10.104.48.39:1521:XE","Industry","Retail"); ResultSet rs1 = null; ResultSet rs2 = null; PreparedStatement ps1=null; PreparedStatement ps2=null;
int showRows=10; int totalRecords=10; int totalRows=nullIntconvert(request.getParameter("totalRows")); int totalPages=nullIntconvert(request.getParameter("totalPages")); int iPageNo=nullIntconvert(request.getParameter("iPageNo")); int cPageNo=nullIntconvert(request.getParameter("cPageNo"));
int startResult=0; int endResult=0; if(iPageNo==0) { iPageNo=0; } else{ iPageNo=Math.abs((iPageNo-1)*showRows); } String query1="SELECT SQLCALCFOUND_ROWS * FROM Industry.Territory limit "+iPageNo+","+showRows+""; ps1=conn.prepareStatement(query1); rs1=ps1.executeQuery();
String query2="SELECT FOUND_ROWS() as cnt"; ps2=conn.prepareStatement(query2); rs2=ps2.executeQuery(); if(rs2.next()) { totalRows=rs2.getInt("cnt"); } %>
<% try{ if(ps1!=null){ ps1.close(); } if(rs1!=null){ rs1.close(); }
if(ps2!=null){ ps2.close(); } if(rs2!=null){ rs2.close(); }
if(conn!=null){ conn.close(); } } catch(Exception e) { e.printStackTrace(); } %>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.