Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Applet resource URL loading

user8807665Dec 11 2014 — edited Dec 11 2014

Hello Sir/Madam,

I am trying to load a resource from Applet using the following code snippet via HTTPS protocol:

url = new URL(..., ...);

URLConnection con = url.openConnection();

DataInputStream bin = new DataInputStream(con.getInputStream());

int len = con.getContentLength();

byte[] bytes = new byte[len];

int read = -1;

int i = 0;

while ((read = bin.read()) != -1)

{

  bytes[i] = (byte) read;

  ++i;

}

I've noticed in Safari Version 6.2 (8537.85.10.17.1) - it's occurring on other Safari version(s) as well, when I view the Java Console, I'm able to see the following log:

network: Cache entry not found [url: https://www.mysite.com/images/logo.GIF, version: null]

network: Connecting https://www.mysite.com/images/logo.GIF with proxy=DIRECT

network: Connecting http://www.mysite.com:443/ with proxy=DIRECT

preloader: Stop progressCheck thread

Connection reset

Noticed on the third log line "network: Connecting http://www.mysite.com:443/ with proxy=DIRECT", any ideas why its using a wrong protocol i.e. instead of HTTPS it's using HTTP? This had caused the browser *primarily Safari* (other browsers seems to ignore this) to hang for about ~30 seconds than I'm presented with "Connection reset" as can be seen in the log. Any ideas as to why the following is happening?

Best regards,

Christopher

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2015
Added on Dec 11 2014
0 comments
736 views