<% /** * dateGenerator will look to a text file, grab info line my line, * and will generate the HTML for this page. * That way all I have to do is alter the text file. * I will also have greater flexibility to alter the look * of the page in a single place. * */ String strBaseDir = getServletContext().getRealPath(""); java.io.File filData = new java.io.File(strBaseDir + (java.io.File.separator) + "currentDates.txt"); java.io.BufferedReader ioReader = new java.io.BufferedReader( new java.io.FileReader(filData)); String strStyleClassName = "normal"; %> souLTower - Current Dates...

souLTower wants to see YOU here....

<% try { String str = ""; while((str = ioReader.readLine()) != null) { /**Ignore blank lines*/ if(str.length() > 0) { %>

<%=str%>

<% } } } catch(Exception e) { // ouch For now print to screen out.println(e.toString()); } finally { ioReader.close(); } /** * Don't forget to close the reader.... */ %>