<%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@page import="dao.*, vo.*, utils.*, exceptions.*, exceptions.sql.*"%> <%@page import="java.util.*"%> <% try{ %> <%@include file="/include/schoolsHeader.htm"%> Schools

<% Database db = new Database(); SchoolDAO schoolDao = new SchoolDAO(db); Collection schools = schoolDao.selectSchools(); Iterator i = schools.iterator(); SchoolVO s; int lastRegionId = -1; while(i.hasNext()){ s = (SchoolVO) i.next(); if(s.getRegionId() != lastRegionId){ //new region lastRegionId = s.getRegionId(); %> <% } %> <% } %>
 
<%=s.getRegion()%>
<%=s.getCity()%> <%=s.getName()%> <% if(!s.getStreet().equals("")){ out.println("
"+s.getStreet()); }%> <% if(!s.getStreet2().equals("")){ out.println("
"+s.getStreet2()); }%>
<%=s.getCity()%>, <%=s.getRegionAbbrev()%> <%=s.getZip()%>
<%=s.getPhone()%>  <% if(s.getShowWeb().equals("y")){ out.print("Website"); } %>
<%@include file="/include/footer.htm"%> <% }catch(Exception e){ throw new WebException("index.jsp", e.getMessage()); } %>