Oppenhiemer
Programmer
Hi -
I am really wanting some help on a problem Im having obtaining HTML response from a CGI application. My intention is to query a CGI application that I have written (using Perl) and to display the results to the user in an easy to use way. I can easy do this using Delphi, but would like to be able to do it with an applet.
The problem is that regardless of what I try, I keep getting the same error message saying something about ms.security violation or some such rubbish.Error reads as follows :
exception : com.security.SecurityExceptionEx(BespokeData.ini):cant access
The code I am using follows :
===========================================================
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.io.*;
import opp.QueryString;
public void init()
{
symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
symantec.itools.lang.Context.setApplet(this);
//{{INIT_CONTROLS
setLayout(null);
setSize(426,266);
add(list1);
list1.setBounds(24,12,276,216);
//}}
String msg = "";
String target = "";
QueryString query = new QueryString("search", target);
try
{
URL u = new URL(" + query);
InputStream in = new BufferedInputStream(u.openStream());
InputStreamReader theHTML = new InputStreamReader(in);
int c;
while ((c = theHTML.read()) != -1)
{
msg += (char) c;
//System.out.print((char) c);
}
}
catch (MalformedURLException e)
{
System.err.println(e);
}
catch (IOException e)
{
System.err.println(e);
}
list1.add(msg);
}
//{{DECLARE_CONTROLS
java.awt.List list1 = new java.awt.List(0);
//}}
}
===========================================================
I have heard about the "Sandbox" security issues with regards applets, but this is rediculous. All I am trying to do is obtain raw HTML response from a CGI application (that I have written ,myself!) After all, is this not what brwosers do - obtain & display HTML responses ? Anyway I really hope someone can help me with this one .
Cheers..
email : oppenhiemer@supanet.com
ICQ : 85745637
I am really wanting some help on a problem Im having obtaining HTML response from a CGI application. My intention is to query a CGI application that I have written (using Perl) and to display the results to the user in an easy to use way. I can easy do this using Delphi, but would like to be able to do it with an applet.
The problem is that regardless of what I try, I keep getting the same error message saying something about ms.security violation or some such rubbish.Error reads as follows :
exception : com.security.SecurityExceptionEx(BespokeData.ini):cant access
The code I am using follows :
===========================================================
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.io.*;
import opp.QueryString;
public void init()
{
symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
symantec.itools.lang.Context.setApplet(this);
//{{INIT_CONTROLS
setLayout(null);
setSize(426,266);
add(list1);
list1.setBounds(24,12,276,216);
//}}
String msg = "";
String target = "";
QueryString query = new QueryString("search", target);
try
{
URL u = new URL(" + query);
InputStream in = new BufferedInputStream(u.openStream());
InputStreamReader theHTML = new InputStreamReader(in);
int c;
while ((c = theHTML.read()) != -1)
{
msg += (char) c;
//System.out.print((char) c);
}
}
catch (MalformedURLException e)
{
System.err.println(e);
}
catch (IOException e)
{
System.err.println(e);
}
list1.add(msg);
}
//{{DECLARE_CONTROLS
java.awt.List list1 = new java.awt.List(0);
//}}
}
===========================================================
I have heard about the "Sandbox" security issues with regards applets, but this is rediculous. All I am trying to do is obtain raw HTML response from a CGI application (that I have written ,myself!) After all, is this not what brwosers do - obtain & display HTML responses ? Anyway I really hope someone can help me with this one .
Cheers..
email : oppenhiemer@supanet.com
ICQ : 85745637