1

I generate javadoc for my project, and host the generated files over HTTPS. But when I click on the link to fetch the JavaDoc of an external class, the content is blocked, because it's on HTTP (for example, Oracle classes). So a reference to the Object class turns up like this in my JavaDoc:

http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true

I could not find anything to configure this in the javadoc maven plugin. What could I do to link to the proper HTTPS external JavaDoc pages?

Jean-François Beauchef
  • 1,291
  • 2
  • 11
  • 21
  • Are the generated links relative or absolute with a FQDN? If relative, can you add a base href tag to the secured https? – Rodrigo Murillo Jun 10 '16 at 16:35
  • I edited the question to answer your question. – Jean-François Beauchef Jun 10 '16 at 16:58
  • Why does your browser block links to an external non-https web site? I've never seen that happen anywhere. And anyway, what prevents you from linking to the https javadoc at oracle? See http://maven.apache.org/plugins/maven-javadoc-plugin/examples/links-configuration.html – JB Nizet Jun 10 '16 at 22:07
  • You have never seen that happen anywhere? Mixed content being blocked? Every browser does this. Here is the message I get in Chrome: Mixed Content: The page at 'https://javadoc.example.com/MyProject/' was loaded over HTTPS, but requested an insecure resource 'http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true'. This request has been blocked; the content must be served over HTTPS. – Jean-François Beauchef Jun 10 '16 at 22:18
  • That's what I don't understand. Why would it request anything from oracle? All it does is contain a link to Oracle, doesn't it? All the doc come from your web site, and this doc consists in HTML containing links to oracle. I'm not saying you're lying, I just don't get what the mixed content is. If https web site couldn't link to non-https web sites, they would be pretty isolated, and it wouldn't really be the web anymore. – JB Nizet Jun 10 '16 at 22:22
  • Ok I get what's confusing you. I am actually clicking on those links of course! That's why I am getting an error message about mixed content. Otherwise, I wouldn't get this error message, that much is obvious. I will edit the question so it is clearer. – Jean-François Beauchef Jun 10 '16 at 22:24
  • I will play around with the links configuration of the maven plug-in to see if it helps. – Jean-François Beauchef Jun 10 '16 at 22:28
  • Even then, I've never seen that happen either. See https://docs.oracle.com/javase/7/docs/api/javax/swing/package-summary.html for example. It's served over https, it contains (at the bottom) several links to non-https URLs, and everything works just fine. – JB Nizet Jun 10 '16 at 22:29
  • Hey you are right. This does not make any sense! Why would I get this error in my case? I am just going on another web site? So what if it is HTTP? Now I am confused. – Jean-François Beauchef Jun 10 '16 at 22:31
  • are you on a corporate network with proxies in between you and the internet? – blurfus Jun 10 '16 at 22:35
  • My guess is that your error has nothing to do with external links to Oracle, but rather to the fact that you're having images, or CSS, or whatever embedded in your documentation and coming from non-https web pages. – JB Nizet Jun 10 '16 at 22:36
  • 2
    ochi: yes I am on a corporate network. JB Nizet: I just tried the version of my JavaDoc without frames, and it works. I can access Oracle's JavaDoc. I have the error only in the frames version of my JavaDoc. – Jean-François Beauchef Jun 10 '16 at 22:38

0 Answers0