Notice


<%@ page language="java" %> <%@ page import="java.sql.*, connection.DatabaseConnection" %> <% Connection con = null; try{ DatabaseConnection dbcon = new DatabaseConnection(); con = dbcon.getConnection(); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("Select * from notice"); while(rs.next()){ String headline = rs.getString("headline"); String details = rs.getString("noticevalue"); out.println(""+headline+"

"); out.println(details); out.println("

"); }//end of while }catch(Exception e){ out.println(e.getMessage()); } finally{ con.close(); } %>