Hi, hope someone can help as Java is a bit tricky!

I have javascript code which calls a java applet, and this applet reads a file and passes the file contents back to javascript. That all works fine.

The problem is that if I ask the java applet for the file contents again it gives me the contents that it read the first time round. As I am resetting the javascript variables it can only be the java code at fault.

javascript:
probs="";
p="";
probs = document.readerApplet.sendtext(p)
<APPLET CODE="Test4.class" NAME="readerApplet" WIDTH="1" HEIGHT="1"></APPLET>

and the java in Test4.class is:

import java.applet.*;
import java.io.*;
import java.awt.*;

public class Test4 extends Applet
{
String me;
String thisLine;
public void init()
{
readTextFromJar("devlist.htm");
}
public void readTextFromJar(String s)
{
try
{
InputStream is = getClass().getResourceAsStream(s);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
while ((thisLine = br.readLine()) != null)
{
thisLine += thisLine;
me += thisLine;
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
public String sendtext(String thetext)
{
return me;
}
}

Thanks.