This is my code, i just want to read the file log1.txt and display the contents of file on the jsp page. When i execute it i found the jsp page with no output display. i find no errors. please help me to sort out this issue



<%@page contentType="text/html" pageEncoding="UTF-8"%>


<%!
String fileOutput;
%>

<%@ page
import="java.lang.*"
import="java.util.Scanner"
import="java.io.FileReader"
import="java.net.*"
%>

<%!
class DisplayLog {

void display(){
try {
String fileName;
String s2="c:/example/log1.txt";
StringBuffer buffer = new StringBuffer();

Scanner scan = new Scanner(new FileReader(s2));


String readdata="";
while ((readdata=scan.nextLine())!=null){

buffer.append(readdata).append('\n');
}
fileOutput = buffer.toString();
}catch(Exception e)
{
}
}
}
%>



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body bgcolor="blue">

<tr>
<CENTER> <img src="images/logo.jpg" width="50" height="60" alt="logo"/><h1>Project</h1> </CENTER>
</tr>
<center><h2>Debug Mode</h2></center>
<HR WIDTH="100%" SIZE="3" NOSHADE>
<FORM METHOD=post ACTION="/cgi-bin/example.cgi">
<!-- <textarea name="txtAreaLog" cols="30" rows="20" readonly="readonly" title="log area"> </textarea> -->
<textarea rows="20" cols="62" readonly =" readonly" WRAP="off"><%= (fileOutput != null) ? fileOutput : "" %></textarea>
</FORM>

<FORM METHOD=post ACTION="/cgi-bin/example.cgi">
Enter file name:<BR>
<INPUT type="text" size="10" maxlength="30">
<INPUT type="Submit" VALUE="Submit">
</FORM>
<div align="right">[ <A href="logout.jsp" style=""><font style="font-family:verdana; font-size:70%;" color="blue"><b>L</b>ogout</font></A> ]</div>
</body>
</html>


Thanks & reagards
shiva