showing text from a file in an applet

i'm trying to build a very simple chatbox and i've succeeded to make one in Active Server Pages. Only problem is that it has to reload, and at this moment all the content disappears and a new page is displayed (just loading a document with a <meta refresh>-tag.

I;ve understood that it is possible to let an applet load a text file (which i generate with ASP) and display it. The applet itself can ask that .asp-document every x seconds and display the text without blinking.

The text consists of 3 parts:

- a url
- the name of the author (in bold)
- the bodytext, stripped from html


http://< jesse - hello people, how are you?

is it hard to make an applet which displays this info? Can anyone make the body of it for me and how many points would you like to have?

greets, Jesse
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

heitAuthor Commented:
the url points to another script, which should only be executed, not shown, and the tag on which one can click is just a smaller-than-sign (<)

HI ,

URL url = new URL("http://"+getCodeBase().getHost()+"/yourfile.asp");

InputStream in = url.openStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));

if ( br != null ) {
String url = br.readLine();
String author = br.readLine();

while ( true ) {
 Stirng line = br.readLine();
 if ( line == null ) break;
 // THis is all your text file.

where ta is java TextArea.

I hope, U understand the key logic.
That's the power of URL in java

Best of luck


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.