When browse a page contains applet through a password protected proxy server, "Enter Network Password" dialog box appears twice.
The first time, proxy server challenge browser for username/password, this is desired behavior. However, if the requested page contains applet, subsequence download of applet classes caused "Enter Network Password" dialog box pop up from Java plugin side again. The second pop up can be avoided by abtaining Proxy-Authentication header from browser, and add this header for subsequence HTTP request.
Customer Problem Description;
We have an applet deployed on a weblogic 6.1 server. Our client is using the 1.3.1 plug in. Our applet has many jar files.
For the most part everything works. Since we have many different property files and support for 9 languages, we use the java.util.ResourceBundle class to manage loading these files.
The property files are located IN the jar files. We only specify the language, so the names look like ... Emulator_de.properties, Emulator_en.properties, etc.
The resource bundle has a private method called calculateBundleNames. This method defines the list of names the class will look for while trying to load the file.
This makes sense, since it is supposed to go from specific to general.
Each time the resourcebundle tries to load a file that is not found in the jars ( Emulator_de_US.properties) it tries to go back to the server and look for the property file.
Now each time it wants to go past our proxy server and through the firewall, java asks for our name and password.
Our product works fine as long as we type in our name and password around 50 times.
Why can it not remember the username and password? I believe this is because it is opening a new connection each time.
We would like some way of getting around this.
We would also like to reduce traffic. If I have 20,000 people logging in each day, that are each making 50 unnecessary hits looking for classes ....
we are talking about 20,000 x 50 = 1,000,000 unnecessary requests to the server.
Create an applet with many properties files.
Make sure there is a proxy server / firewall in between the client and the server.
Try to use resource bundle to read the properties files from the jars.
This should prompt you for you name and password for each time it looks back at the server.