kurtomerfaruk / wicked-charts

Automatically exported from code.google.com/p/wicked-charts
0 stars 0 forks source link

wicked-charts does not work with https/ssl #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Access your wicked-charts application over https

What is the expected output? What do you see instead?

1. Highcharts should be shown
2. The highcharts js files cannot be loaded
3. Highcharts does not work

What version of the product are you using? On what operating system?
wicked-charts-wicket6-1.4.3.jar

Please provide any additional information below.

JavaScriptResourceRegistry uses following URLS:

public static final String DEFAULT_HIGHCHARTS_URL = 
"http://code.highcharts.com/2.3.5/highcharts.js";

public static final String DEFAULT_HIGHCHARTS_MORE_URL = 
"http://code.highcharts.com/2.3.5/highcharts-more.js";

public static final String DEFAULT_HIGHCHARTS_EXPORTING_URL = 
"http://code.highcharts.com/2.3.5/modules/exporting.js";

These cannot be accessed by SSL. Furthermore, when using HTTPS, the SSL 
identity is not verified and cannot be loaded as well.
I would suggest to use the js files from dnjs.cloudflare.com and use "//" in 
the url instead of "http://" or "https://".

e.g.: public static final String DEFAULT_HIGHCHARTS_URL = 
"//cdnjs.cloudflare.com/ajax/libs/highcharts/2.3.5/highcharts.js"

Current workaround:
Add this two lines to your application

JavaScriptResourceRegistry.getInstance().setHighchartsReference("//cdnjs.cloudfl
are.com/ajax/libs/highcharts/2.3.5/highcharts.js");
JavaScriptResourceRegistry.getInstance().setHighchartsExportingReference("//cdnj
s.cloudflare.com/ajax/libs/highcharts/2.3.5/modules/exporting.js");

Original issue reported on code.google.com by dieter.m...@gmail.com on 16 May 2013 at 8:28

GoogleCodeExporter commented 9 years ago
Hi Dieter,

the workaround you mention is actually the correct way to work with SSL. I 
don't want to include the highcharts javascript files in the Wicked Charts 
distribution because of potential licensing problems.

You can download the highcharts javascript files yourself though, and use 
JavaScriptResourceRegistry.getInstance().setHighchartsReference() to deliver 
them from your Wicket application to work out the SSL problem.

I will include the SSL keyword in the wiki ...

Thanks and Regards,
Tom

Original comment by tom.homb...@gmail.com on 17 May 2013 at 7:10

GoogleCodeExporter commented 9 years ago

Original comment by tom.homb...@gmail.com on 12 Jun 2013 at 7:16