wood burning stoves 2.0*
The moose likes Applets and the fly likes get error Password Needed - Networking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "get error Password Needed - Networking" Watch "get error Password Needed - Networking" New topic

get error Password Needed - Networking

Jane Owens

Joined: Jun 16, 2006
Posts: 4
I am not very experienced with java...

One of the functions we provide as part of our web applicationsis ability to print certificates which is done via java applet to control number of copies printed. There is a button on the page that calls java applet. Jar file with all necessary java classes and manifest are usually placed in some directory on web server that the web server has access to. We have implemented this jar file many times and did not have any problems.

Current Issue:
We implemented everything as we always have done. However, when we press the button that opens java applet we get an error �Password Needed � Networking� and user is prompted to enter their login information. How can we get rid of this message poping up?

If you have seeing this before and know how to fix it, please let us know.
Jane Owens

Joined: Jun 16, 2006
Posts: 4
More information. Below is the code that calls java applet using Java-Plug-in:

HTP.P('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"');
htp.p('WIDTH = 620 HEIGHT = 880 NAME = "Print_Cert" ALIGN = top VSPACE = 0 HSPACE = 0 codebase="https://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">');
htp.p('<PARAM NAME = "ARCHIVE" VALUE = "'||UPPER(vsb_util_pkg.get_sys_config('default_state', 0))
||'_print_cert.jar" >');
htp.p('<PARAM NAME = "CODE" VALUE = "print_cert.'||UPPER(vsb_util_pkg.get_sys_config('default_state', 0))
||'.print_cert.class" >');
htp.p('<PARAM NAME = "CODEBASE" VALUE = "'||vsb_cnst.java ||'" >');
htp.p('<PARAM NAME = NAME VALUE = "Print_Cert" >');
HTP.P('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
HTP.P('<PARAM NAME="scriptable" VALUE="false">');
htp.p(' <EMBED type="application/x-java-applet;version=1.4" ');
htp.p(' scriptable=false pluginspage="https://java.sun.com/j2se/1.5.0/download.html" ');
htp.p(' WIDTH = 620 HEIGHT = 880 NAME = "Print_Cert" ALIGN = top VSPACE = 0 HSPACE = 0 ');
htp.p(' ARCHIVE = "'||vsb_util_pkg.get_sys_config('default_state', 0)||'_print_cert.jar" ');
htp.p(' CODE = "print_cert.'||(vsb_util_pkg.get_sys_config('default_state', 0))||'.print_cert.class" ');
htp.p(' CODEBASE = "'||vsb_cnst.java ||'" ');
htp.p(' NAME = "Print_Cert" ');
htp.p(' MAYSCRIPT = true ');
htp.p(' type = "application/x-java-applet;version=1.4"');
htp.p(' scriptable = "false"');
htp.p(' >');
htp.p('<NOEMBED>No Java Support.</NOEMBED>');

Also, we now that the only thing that is different about our current implementation of our web application is that it is running behind a proxy server (we never had a proxy server before).

Thank you for helping.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42280
Welcome to JavaRanch.

It would be more helpful to see the HTML that actually gets created by this code, than the code that creates it.

Is the directory where the applet resides on the web server possibly not open to the general public - maybe some inadvertently changed permissions on one of the files?

Ping & DNS - my free Android networking tools app
Jane Owens

Joined: Jun 16, 2006
Posts: 4
Thank you for responding, here is the code generated:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 620 HEIGHT = 880 NAME = "Print_Cert" ALIGN = top VSPACE = 0 HSPACE = 0 codebase="https://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<PARAM NAME = "ARCHIVE" VALUE = "GS_print_cert.jar" >
<PARAM NAME = "CODE" VALUE = "print_cert.GS.print_cert.class" >
<PARAM NAME = "CODEBASE" VALUE = "/java/gs_vsims/" >
<PARAM NAME = NAME VALUE = "Print_Cert" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
<EMBED type="application/x-java-applet;version=1.5.0"
scriptable=false pluginspage="https://java.sun.com/j2se/1.5.0/download.html"
WIDTH = 620 HEIGHT = 880 NAME = "Print_Cert" ALIGN = top VSPACE = 0 HSPACE = 0
ARCHIVE = "GS_print_cert.jar"
CODE = "print_cert.GS.print_cert.class"
CODEBASE = "/java/gs_vsims/"
NAME = "Print_Cert"
type = "application/x-java-applet;version=1.3"
scriptable = "false">
<NOEMBED>No Java Support.</NOEMBED>

The file permissions were not changed, but we are going through proxy server and that proxy server was not setup by us.
Jane Owens

Joined: Jun 16, 2006
Posts: 4
Can somebody tell me if there is something special I need to do for java applet to work via Java Plug In mechanism when we did not used to go through proxy server and now we are?

I agree. Here's the link: http://aspose.com/file-tools
subject: get error Password Needed - Networking