Applets and Netscape 6!

Hi there,

I am not sure if this is the right forum to post my question. However, i saw some discussions reg. Applets on Netscape 6 and i guess that many of you might be familiar with the scenario.

I'm having trouble getting any applets to work on Netscape 6 when I have HTTP authentication on the webserver enabled. The applet works fine under normal circumstances.

Instead of loading the applet, I get a Java dialog box saying "Enter Network Password" and asks me to enter my username/password. This is a specific Java dialog box, complete with a picture of Duke, and it

gives my firewall, digest and realm information.

However, the dialog box doesn't accept my username/password, and doesn't

display my applet.

Here is what i captured on the Java console:

======= Default Browser Messages =========

Java(TM) Plug-in: Version 1.3.0_01

Using JRE version 1.3.0_01 Java HotSpot(TM) Client VM

User home directory = C:\Documents and Settings\hsivapatham

Proxy Configuration: Browser Proxy Configuration

-

c:clear console window

f:finalize objects on finalization queue

g:garbage collect

h:display this help message

l:dump classloader list

m:print memory usage

q:hide console

s:dump system properties

t:dump thread list

x:clear classloader cache

0-5: set trace level to <n>

-

Trace level set to 5: basic, net, security, ext, liveconnect ... completed.

Registered modality listener

Referencing classloader: sun.plugin.ClassLoaderInfo@5256fa, refcount=1

=========== Loading the Applet... ==========

Added trace listener: sun.plugin.navig.win32.AppletPluginPanel[SpeedDial,0,0,300x295,invalid,layout=java.awt.BorderLayout]

Sending events to applet. LOAD

Determine if the applet requests to install any HTML page

Sending events to applet. INIT

Sending events to applet. START

HTML Installation finished.

===== Not sure what this means? =========

Determine if the applet requests to install any JAR

Jar cache option: null

Jar archive(s): null

Jar cache version(s): null

Applet Installation finished.

====================================

Opening http://10.1.1.126:90/SpeedDialApplet.jar

Connecting http://10.1.1.126:90/SpeedDialApplet.jar with no proxy

======= Puts up a dialog box asking for username and password ==========

Firewall authentication: site=VAANI/10.1.1.126:90, protocol=http, prompt=xpressa, scheme=basic

Modality pushed

Modality popped

User selected: 0

Opening http://10.1.1.126:90/SpeedDial.class

Connecting http://10.1.1.126:90/SpeedDial.class with no proxy

java.lang.NullPointerException

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)

at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source)

at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)

at java.net.HttpURLConnection.getResponseCode(Unknown Source)

at sun.applet.AppletClassLoader.getBytes(Unknown Source)

at sun.applet.AppletClassLoader.access$100(Unknown Source)

at sun.applet.AppletClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.applet.AppletClassLoader.findClass(Unknown Source)

at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadCode(Unknown Source)

at sun.applet.AppletPanel.createApplet(Unknown Source)

at sun.plugin.AppletViewer.createApplet(Unknown Source)

at sun.applet.AppletPanel.runLoader(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

</code>

Thanks for your help.

Priya

[4317 byte] By [harippriya] at [2007-9-26 5:36:31]
# 1
tried with netscape 4.76?by any chance r u using signed applets?
csavsur at 2007-7-1 13:47:09 > top of Java-index,Security,Signed Applets...
# 2
tried with netscape 4.76?by any chance r u using signed applets?
csavsur at 2007-7-1 13:47:09 > top of Java-index,Security,Signed Applets...
# 3

I've got the same problem.

Applet works fine in all versions of IE.

It also works in NS4.x

The class loader doesn't appear to be passing on the credentials. I've also tried converting the page to use the plugin to see if that might fix the problem. It didn't. I've been struggling with this one for a long time. Sure would appreciate a fix.

gregc30 at 2007-7-1 13:47:09 > top of Java-index,Security,Signed Applets...
# 4

Sorry that i did not get a chance to continue with this thread. Anyway thanks to Suresh who took the time to look into this problem.

Even after such a long time, the problem still exists. The applet works fine on all versions of IE and NS 4.x

The applet is not signed.

I would really appreciate any help.

Thanks

Harippriya

hpriya_radhakris at 2007-7-1 13:47:09 > top of Java-index,Security,Signed Applets...
# 5

Try going into the directory security settings on the directory or its parent in IIS for example and hardwire the Basic Authentication domain to either the server or the domain the server is in, just to see if you can authenticate there at least.

We ran into this dialog last week on IE5.5 and NS 6.2 we were able to authenticate using a user account on the server this way.

/michael

obrienm8 at 2007-7-1 13:47:09 > top of Java-index,Security,Signed Applets...
# 6
hi, i guess it is a problem with a firewall.I had my signed applet running on a webserver and it did prompt me with a basic authentication popup.It runs perfectly in my browser.What is your applet trying to do?
mallepaddi at 2007-7-1 13:47:09 > top of Java-index,Security,Signed Applets...
# 7

oops, i forgot to add this, can u tell me what speeddial.class is trying to do?

i belive u r making a url connection in that class and u got a null exception.

if u r indeed making a urlconnection, be sure to include the basic authentication in the headers. here is a sample

String basicAuth = Base64Coder.base64Encode("username:password");

basicAuth = "Basic " + basicAuth;

java.net.URL url = new java.net.URL(strUrl);

java.net.HttpURLConnection con = (java.net.HttpURLConnection) url.openConnection();

con.setRequestProperty("Authorization", basicAuth);

mallepaddi at 2007-7-1 13:47:09 > top of Java-index,Security,Signed Applets...