%@ page contentType="text/html; charset=iso-8859-1" language="java" errorPage="" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="dcnPackage.*" %>
datacorner Rant v1.0
<%!
public String readTinyFile(String flname){
String inputLine="";
String readText="";
FileReader fwIn;
try{
fwIn=new FileReader(flname);
BufferedReader lineIn = new BufferedReader(fwIn);
while ((inputLine = lineIn.readLine()) != null) {
readText=new String(readText + inputLine);
}
fwIn.close();
}catch (Exception e){
readText=new String("no file");
}
return readText;
}
%>
<%
String loadText="";
String fpath="c:/temp/";
String[] argSet1=null;
String fname="intro.html"; // an intro page that is displayed at the opening screen
// allows alternate display coming in...e.g. look at the return from displayDir.jsp
if ((argSet1=request.getParameterValues("fileName"))!=null)
fname=argSet1[0];
loadText=readTinyFile(fpath+fname);
%>