manne
asked on
Getting a WWW-page
I'm working with a program that uses the following lines to get a www-page (form Visual J++ sourcebook). When I run
from within J++ it works, but with a browser the following
run-time error occurs "security. Couldn't connect to www.foo.foo with orgin from file". Whats up? I've also used
JDK, but I get the same result.
InputStream conx;
DataInputStream text;
String line;
StringBuffer b=new StringBuffer();
try{
conx=this.myUrl.openStream ();
text=new DataInputStream(new BufferedInputStream(conx)) ;
while ((line=text.readLine())!=n ull){
b.append(line+"\n");
}
}
catch(Exception e){
showStatus ("Error reading file: "+ e.getMessage());
}
from within J++ it works, but with a browser the following
run-time error occurs "security. Couldn't connect to www.foo.foo with orgin from file". Whats up? I've also used
JDK, but I get the same result.
InputStream conx;
DataInputStream text;
String line;
StringBuffer b=new StringBuffer();
try{
conx=this.myUrl.openStream
text=new DataInputStream(new BufferedInputStream(conx))
while ((line=text.readLine())!=n
b.append(line+"\n");
}
}
catch(Exception e){
showStatus ("Error reading file: "+ e.getMessage());
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.