servlet-null error
hey
i dnt no if any1 can help me?
i wrote a servlet which basically opens an random access file and dispalys the content of the file on a web page.
when i run its given me no errors but on the web page its keep saying null...
i dnt really no why its doing it.
here is the code..
File name = new File("c:/resin-2.1.5/doc/meng/database.txt");
if(name.exists())
{
try
{
RandomAccessFile r =new RandomAccessFile(name, "r");
String text=null;
while((text=r.readLine()) != null)
System.out.println(text);
out.println( text + "\n");
}
catch(IOException e2)
{}
}
when i did system.out.println(text) as you can see i can see the content of the file on my console but its not dispalying it on the web page
thanks

