Closed
Bug 204337
Opened 22 years ago
Closed 22 years ago
Invalid dialog when JavaScript calls signed Java applet that prints
Categories
(Core Graveyard :: Java: OJI, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: wmccain, Assigned: joshua.xia)
References
()
Details
Attachments
(2 files)
When a signed applet is loaded, a "Java Security Warning" dialog appears and the
user must "Grant" permission for the privileged applet to be loaded. A signed
Java applet can print pages (not necessarily related to what the applet displays
on the Web page). When such a printout is initiated by an applet-monitored
event (keystroke, mouse click, etc.) it works correctly. But when such a
printout is initiated via a JavaScript/LiveConnect call to the Java applet (for
example, by clicking a FORM button on the Web page), a second pop-up dialog
appears as follows:
"Warning / An applet would like to print / Is this OK? / Yes / No".
This additional pop-up dialog is normally used to request permission for
printing by an UNSIGNED applet. It is invalid in this situation, since the
applet is SIGNED and thus is already authorized to do printing. Furthermore,
the invalid pop-up dialog occurs only under Mozilla. It does NOT occur when
JavaScript calls a signed Java applet to print in any of the following situations:
• With Microsoft IE, using the latest Sun Java plug-ins (1.4.1, 1.4.0, and earlier).
• With Microsoft's own obsolete JVM which requires a signed applet in
Microsoft's CAB format).
• With Java 1.1 in Netscape Navigator 4.x (requires applet to call Netscape's
now-obsolete Java security API).
Reporter | ||
Comment 1•22 years ago
|
||
Reporter | ||
Comment 2•22 years ago
|
||
Reporter | ||
Comment 3•22 years ago
|
||
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312
Reproducible: Always
Steps to Reproduce:
1. Access my test case at http://www.metaconnect.com/print.htm. When a Java
Security Warning dialog pops up, click on "Grant this session".
2. Click on the Java applet (white letters on red background). This works (a
page will print).
3. Click the FORM button labeled "Print Test". This fails (an invalid dialog
will pop up). The browser also appears to hang, which I reported previously in
bug report #197662. However, I have been informed that the apparent "hang" is
actually a performance problem and that it eventually starts up again after
several minutes. This performance problem is being address by bug #193272.
NOTE: See attachments for the source code for both the Web page and the Java
applet. To test from these source materials, you must have an object-signing
certificate and you must use it to sign the Java applet in JAR format (using
"signtool"). (The test case applet on my Web site is already signed.)
Actual Results:
When the Java applet is clicked, a Print Dialog pops up. When you click "OK", a
page is printed that says "This is a test of printing!"
When the "Print Test" FORM button is clicked, an invalid warning box pops up.
(The warning box says "An applet would like to print / Is this OK?".) The
browser appears to hang, but this is "only" a performance problem.
Expected Results:
BOTH tests should have identical results: a Print Dialog pops up, and when "OK"
is clicked, a page is printed that says "This is a test of printing!". After
clicking both "buttons", you should have two such pages printed on your printer.
See attached source code (Web page and Java applet).
Assignee | ||
Comment 4•22 years ago
|
||
I can't reproduce this bug when I use JRE1.4.2-beta-b19 + mozilla build 20030422,
both work well (just slower when you click "Print Test" button.
Please use the latest JRE (you can download it from http://java.sun.com
Thanks!
WFM
Assignee | ||
Comment 5•22 years ago
|
||
->WFM
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•