JDK-4851991 : {@docroot} in -bottom causes broken link for help-doc.html
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: other
  • CPU: generic
  • Submitted: 2003-04-22
  • Updated: 2014-05-05
  • Resolved: 2003-09-26
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
5.0 tigerFixed
Description
{@docroot} resolves to the empty string "" in the help-doc.html page when used 
with the -bottom option.  It should resolve to a dot "." character.

In this makefile that runs javadoc:
   <ws>/make/docs/Makefile

the -bottom option contains this string:

For further API reference and developer documentation, see <a href="{@docroot}/../relnotes/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. 

The URL resolves in api/hel-doc.html to:
 <a href="/../relnotes/devdocs-vs-specs.html">

and should instead resolve to:
 <a href="./../relnotes/devdocs-vs-specs.html">

The link to the license terms in that same -bottom option in help-doc.html
is also broken the same way:
 
   Use is subject to <a href="/../relnotes/license.html">license terms</a>.

Changing it to a dot "." fixes it.

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

PUBLIC COMMENTS This bug has been fixed for the 1.5 release. The {@docRoot} tag now resolves to "." instead of empty string when used in files that are stored in the root directory. ###@###.### 2003-05-04
04-05-2003

EVALUATION This might be due to {@docroot} not being spelled {@docRoot} (capital 'R'), but it resolves to the correct value on class pages. For example, on api/javax/swing/AbstractAction.html, {@docroot} resolves in the first URL to the proper value "../.." in: <a href="../../../relnotes/devdocs-vs-specs.html"> I recall when fixing this problem for other pages, I had to set the relative path for those pages. The fix to this problem is probably to set the relative path for help-doc.html, and to ensure it is set properly for all other pages (particularly non-class pages). Be sure to add test cases for all of the pages that are fixed. ###@###.### 2003-04-22 This bug has been fixed. The problem was that member relativepathNoSlash was initialized with "". It should be initialized with ".". I will mark this bug as fixed when the doclet toolkit is checked into the TL workspace. ###@###.### 2003-05-04
04-05-2003