Skip to Content
0
Former Member
Sep 28, 2005 at 07:44 PM

Open URL connection within applet to BSP page

54 Views

Hi,

i have the following scenario:

- A BSP page contains an applet with use a jar-archive.

- The user enter some messages on the applet.

- A java class (of the jar archive) tries to open the URL of the applet to send the user input for further processing.

The last step fails without an error message.

I've activate debug modus on the server but nothing happened. Only at the beginning when the HTML page is loaded the debug window opens. (Each request to this page will switch to debug mode.)

If I copy myURL into a browser then it functioned.

Any thoughts are appreciated,

Andy

____________________________

A snippet of my code:

try {

myConnection = (HttpURLConnection)myURL.openConnection();

} catch (IOException e1) {

//do error handling

return false;

}

//configure connection

myConnection.setDoOutput(true);

myConnection.setDoInput(true);

try {

gcaConnection.connect();

out = gcaConnection.getOutputStream();

} catch (IOException e1) {

//do error handling

return false;

}

String send = "Hallo";

try {

out.write(send.getBytes());

out.flush();

out.close();

} catch (IOException e1) {

//do error handling

return false;

}