<%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> TwiHotels : Public Timeline <%@ include file="connectionDB.jsp" %> <%@ include file="header.jsp" %> <% ResultSet rs = null; Statement st = null; String sql = ""; try { //sql = "select TweetId from tweets"; sql = "select * from tweets a, country b, city c, login d" + " where a.Country=b.countryid and a.City=c.cityid and a.UId = d.user_id"; st = con.createStatement(); rs = st.executeQuery(sql); int total = 0; while(rs.next()){ total++; } int pages = total/20; if(total%20 != 0) pages++; %>
  Home  
Public Timeline Total tweets : <%=total%>
<% } catch(Exception ex) { System.out.println("Error in public timeline "+ex); } finally{ if(rs!=null) rs.close(); if(con!=null) con.close(); } %> <%@ include file="footer.jsp" %>