<%@ page import='java.sql.*'%> <%@ page session="true" %> Two Rivers Clinic - Acupuncture - Eau Claire, WI <%! String bgcolor;%> <%! String marqtext;%> <% Connection conn = null; Statement stmt = null; ResultSet rs = null; marqtext="Something"; try{ Class.forName("org.gjt.mm.mysql.Driver"); conn = DriverManager.getConnection("jdbc:mysql://localhost/tworiverscl", "tworiverscl","twosch"); stmt = conn.createStatement(); rs = stmt.executeQuery("select color FROM TRCcolors ORDER BY RAND()"); while( rs.next() ){ bgcolor=rs.getString("color").trim(); } rs.close(); rs = stmt.executeQuery("select pageText FROM TRCtexts where pageName='marquee'"); if( rs.next() ){ marqtext=rs.getString("pageText").trim(); } } finally{ if(rs != null) rs.close(); if(stmt != null) stmt.close(); if(conn != null) conn.close(); } %> <% String p = request.getParameter("page"); if (p == null || p.equals("")) { p=request.getParameter("view"); if (p==null || p.equals("")) { p="main"; } } p=p+".jsp"; %>
<%=marqtext%>

<%//try{%> <%//} //catch (Exception e){ //out.println("
Page Not Found"); //out.println("

We're sorry, but the page you are looking for, \"" + p +"\", could not be found."); //out.println("

Please click here to go to our homepage"); //}%>