PDA

Click to See Complete Forum and Search --> : That URL Class


Fwank79
Nov 29th, 2000, 08:51 AM
Hi,

I have some troubles with the URL Class.

Here's my code:

----

import java.applet.Applet;
import java.awt.*;
import java.lang.Object;
import java.net.*;
import java.io.*;

public class TeeTime extends Applet{

public void paint(Graphics g){
URL u = null;
String Adress = null;
Object print;
Adress = new String("http://www.bayteksystems.com/files.html");

try{
u = new URL(Adress);
}
catch(MalformedURLException t){
g.drawString("Malformed Url",25,20);
}

print = new Object();

try {
print = u.getContent();
}
catch(IOException e) {
g.drawString("IO Exception Error",25,35);
g.drawString(e.getMessage(),25,50);
}
g.drawString(print.toString(),25,65);
}
}

---

Then i get the error : no content-type.

What should i do?

thank-you