JDK-4645058 : REGRESSION: stddoclet: Javascript IE load error when linked by -linkoffline
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt,windows_2000
  • CPU: x86
  • Submitted: 2002-02-28
  • Updated: 2014-05-05
  • Resolved: 2002-09-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Duplicate :  
Description
Name: nt126004			Date: 02/28/2002

FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION : win NT4 (SP6)

A DESCRIPTION OF THE PROBLEM :
More of a glitch in the Sun web page hierarchy than a bug.

When I generate javadoc pages for my source tree using -linkoffline, 
I use

  javadoc -linkoffline http://java.sun.com/j2se/1.4/docs/api
           http://java.sun.com/j2se/1.4/docs/api ...

Which generates the correct links in the generated web
pages.  However, when I access any of them (using MS IE 5),
For example, when the java.lang.Object page loads:

  http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html

there is no loss of content or functionality as far as I can tell.
However, in the bottom left corner of IE, there is a little yellow yield
sign (with an "!"  in it).  Next to that is the text "Error on page."
I get the following error:

Line: 14
Char: 1
Error: Access is denied.
Code: 0
URL:
http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html

REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. generate local web pages with javadoc (as described
above)
2. view said pages in internet explorer (with frames!)
3. follow a reference to a standard java class

EXPECTED VERSUS ACTUAL BEHAVIOR :
The page views fine.

A look at the source shows that the offending line is:

parent.document.title="Object (Java 2 Platform SE v1.4.0)";

which is part of the cleverly-named function asd (inside a
<SCRIPT> block)

ERROR MESSAGES/STACK TRACES THAT OCCUR :
see above

This bug can be reproduced always.
(Review ID: 139241) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b03
14-06-2004

EVALUATION From duplicate bug 4507507, that submitter wrote: The error does specifiy a line number within the html..here it is <SCRIPT> function asd() { parent.document.title="Exception (Java 2 Platform SE v1.4.0)"; } </SCRIPT> <BODY BGCOLOR="white" onload="asd();"> Added "javascript" to synopsis ###@###.### 2002-06-12 Waltrand on BugParade says: Looks like a regression in 1.4. If generated with 1.3.1_01, the link to external classes opens a new window, with its own frame set, and no access violation occurs. ###@###.### 2002-06-12 I reproduced this bug in Windows Internet Explorer 5.5 on Win98 and IE 6.0 on Win2000. It is not reproducible in Solaris Netscape 4.79 I got the same little yellow ! yield sign and the same message. However, I get the error on the local page BEFORE going to the Object page. It points me to a different problematic script that tried to display the words "All Classes" to the right of "Frames | No Frames": <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--> </SCRIPT> ###@###.### 2002-09-13 Copied from bug 4275630: * Many other invalid elements as shown in "Comments" section, such as <SCRIPT> requires "type" argument: <SCRIPT type="text/javascript"> The <SCRIPT> element is currently mistakenly *between* the <HEAD> and <BODY> elements. Try moving it to <HEAD> or <BODY>. The w3c validator currently creates a parse tree with a second <BODY> tag before the <SCRIPT>
11-06-2004

PUBLIC COMMENTS Fixed by adding the "type" attribute to: <SCRIPT type="text/javascript"> and by correcting the placement of the <SCRIPT> element from: <HEAD> </HEAD> <SCRIPT> </SCRIPT> <BODY> </BODY> to <HEAD> <SCRIPT> </SCRIPT> </HEAD> <BODY> </BODY> I did this by creating a method printWinTitleScript in HtmlWriter and call it (conditionally) just prior to headEnd() in HtmlStandardWriter. The condition is required by bug 474438: Window title shouldn't change when loading left frames I also converted <SCRIPT type=\"text/javascript\"> to method script() so it could be re-used in two places. Modified: com/sun/tools/doclets/standard/HtmlStandardWriter.java com/sun/tools/doclets/HtmlWriter.java Regression test at: <ws>/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java ###@###.### 2002-09-16
16-09-2002