Weasis on Google Chrome

1,480 views
Skip to first unread message

Jon Ander Zuccaro

unread,
Nov 5, 2013, 6:45:57 PM11/5/13
to dcm...@googlegroups.com

In a problem that seems to be related to all JNLP files now Google Chrome has decided that it won't launch a JNLP file directly without prompting the annoying "this file may harm your computer" thing. So I have to click allow each and every time I want to display a study.


Google Chrome, an otherwise good product, fails miserably to give you an option to change this behavior while Firefox and IE open the JNLP file directly. People have been asking Google to fix this for 3 years now, without any positive response.


Selecting “Always open files of this type.” won't help since the prompt is displayed even before the file is downloaded, and when it finally downloads you end up with a collection of jnlp files in your downloads folder: viewer (2).jnlp, viewer (3).jnlp, viewer (4).jnlp,......viewer (55).jnlp,viewer (56).jnlp.


They refusal to fix this seems intentional, it looks like they don´t particularly care for Java Web Start.


Under which criteria Chrome decides to block or allow jnlp files? Nobody knows, for instance, the jnpl files from this page are launched directly: http://pscode.org/jws/api.html while the ones for http://dicom.vital-it.ch:8089/dcm4chee-web3/ are not (probably because those are dynamically generated while the firsts are static). And I could swear that they open on Chrome in linux but not on Windows.


I found a, kind of, solution: use the Deployment Toolkit Script from Java (http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html ), so now I launch Weasis like this:


deployJava.launchWebStartApplication('http://192.168.1.107:8080/weasis-pacs-connector/viewer.jnlp?patientID=' + aData[4]);



Works on every browser, plus it removes the ugly popup window that was opened while the jnlp file was downloaded.

I don´t know exactly how this works but it does, I all know is that while doing it this way the “Java” splash screen is displayed every time weasis is launched, this is very annoying, but at least the stupid “this file may harm your computer” thing is gone.

On the other hand, I would like to know if it is possible to close all opened studies in Weasis when I open a new one while still reusing the same instance.


Thank you.


nicolas...@gmail.com

unread,
Nov 6, 2013, 1:50:21 PM11/6/13
to dcm...@googlegroups.com
I agree that it would be a better practice to use the RIA javascript provided by Oracle instead of launching the direct jnlp URL. We do the same for our web applications.

For improving the launcher in dcm4chee-web3, it should be possible to load an hidden window containing deployJava.launchWebStartApplication(jnlpURL). The action of dcm4chee-web3 viewer button is defined here.

For always closing all the previous patients, you can add in the jnlp template (see how to change the default configuration):
<argument>$dicom:close -a</argument>

Jon Zuccaro

unread,
Nov 6, 2013, 2:08:13 PM11/6/13
to dcm...@googlegroups.com
Thanks Nicolas, so it is possible, great news.




--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/7t8NPdcpT8A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/groups/opt_out.

Jon Ander Zuccaro

unread,
Nov 7, 2013, 1:11:48 PM11/7/13
to dcm...@googlegroups.com
So, I tested it, and the option worked like a charm.

Thank you very much.

Arnold Maderthaner

unread,
Jan 9, 2015, 10:50:45 AM1/9/15
to dcm...@googlegroups.com
I'm having the accept same issue that I get this dumb chrome keep/discard question. Was this change/fix incooperated into Weasis ?

Jon Ander Zuccaro

unread,
Jan 10, 2015, 12:02:13 AM1/10/15
to dcm...@googlegroups.com
I think this problem is related to the way Chrome works, I don't think that it can be fixed via weasis. As far as I know, since the last time that I tried to solve this, both Java and Chrome became even more restrictive. Use the javascript library provided by Oracle, is the only way... or avoid Chrome.

This is very annoying.

Nicolas Roduit

unread,
Jan 11, 2015, 3:26:56 PM1/11/15
to dcm...@googlegroups.com
I noticed with Chrome in some cases the message Keep/Discard always appears (even when you right click on the down arrow and select "Always open files of this type"). If you try the links in attachment:
1) in getjnlp.html the link " Get JNLP by Javascript window open" will always show the message in Chrome.
2) With the html redirection Chrome also shows the warning message.

Unfortunately, the javascript library provided by Oracle doesn't help for launching the jnlp, it only helps for the version restrictions and for the message to install Java.

I'm working to improve how to launch Weasis from the dcm4chee-web3 interface by building the weasis manifest directly from the dicom model of dcm4chee-web3 and I made some changes to have neither the warning messages from Chrome nor the white popup window. I've just published my modifications in dcm4chee-web3.

I is also possible to switch in Applet mode but I would not recommend because there are even more restrictions from the web browsers (requires Java Plugin).
getjnlp.html
htmRedirection.html

Jon Ander Zuccaro

unread,
Jan 11, 2015, 10:30:12 PM1/11/15
to dcm...@googlegroups.com
This worked for me:


function openImages()
{
deployJava.launchWebStartApplication('../../weasis-pacs-connector/viewer.jnlp?studyUID=1.2.840.113619.2.5.1762897131.1768.1052256561.xxx.xxxx);
}

That's using the the deployJava.js library and, indeed, I think the Java Plugin is necessary, but it works, on all browsers and Chrome displays no warnings once the page has been authorized to run the Java Plugin. 

This is from an external application, not dcm4chee-web

Nicolas Roduit

unread,
Jan 12, 2015, 3:20:46 AM1/12/15
to dcm...@googlegroups.com
For instance, if you run deployJava.launchWebStartApplication(...) on Chrome from a 64-bit Linux system, you will be redirected to the Java download page. The problem is because the Oracle script uses the Java Plugin and Google is going to remove NPAPI that is used by Java Plugin, see FAQ (there is no solution except installing Chrome inferior to 35). If you don't use the Oracle script you will be able to run the jnlp file (the system will execute the jnlp), so for this reason I would not recommend to use deployJava.js.

Jon Ander Zuccaro

unread,
Apr 21, 2015, 10:23:58 PM4/21/15
to dcm...@googlegroups.com

As of April 2015, just like you anticipated, with the new version of Google Chrome NPAPI has been removed by default, by September 2015 the Java plug in will be gone once and for all from Chrome.


The deployJava.js is now useless and I still can't open Weasis automatically from Chrome by directly downloading the jnpl.


Google has now ignored the request for allowing the opening of jnpl files automatically for years now, this is obviously by design and won't be fixed.


The solution is to avoid Chrome.

Nicolas Roduit

unread,
Apr 26, 2015, 1:03:01 PM4/26/15
to dcm...@googlegroups.com
No, in Chrome you can open Weasis by one click on an hyperlink. If you look in the previous message, the option of right clicking on the down arrow and selecting "Always open files of this type" should work.

If your using dcm4chee-web3, you'll get a warning message because the jnlp is open in a popup. I published some modifications in dcm4chee-web3, see this post.

Jon Ander Zuccaro

unread,
Apr 27, 2015, 2:36:58 AM4/27/15
to dcm...@googlegroups.com
You are right Mr Roduit, it works, for now I am able to open Weasis directly using a post request in chrome, all I had to do was to select the "always open this type of files" thing (I am launching it from a RIS) like you pointed. It actually works better than the deployJava script because I am not faced with the Java splash screen each and every time I launch Weasis, the downside is the fact that a file viewer(1).jnlp.. viewer(2).jnlp is created in the downloads folder each and every time and... Chrome decides that it won't save any more files once it reaches viewer(100).jnlp (https://code.google.com/p/chromium/issues/detail?id=135428) and prompts the user for action until all the junk from the downloads folder is cleared. The solution is, I guess, to generate random names for the jnlp. I will try this since, in one scenario, I am constructing the JNLP file.

Thank you very much.
Reply all
Reply to author
Forward
0 new messages