source: main/trunk/gli/README_WebGLI.txt@ 32919

Last change on this file since 32919 was 32919, checked in by ak19, 5 years ago

Further details

File size: 8.3 KB
RevLine 
[32136]1--------------------------
2README
3--------------------------
4
[32916]5GLI Java Web Start application (replacement for GLI Applet) - Additional Steps
[32136]6
[32917]7Many browsers have stopped supporting Java applets including Microsoft Edge, though Microsoft's Internet Explorer still supported it. For this reason, 3.09's GLI is now no longer provided as an applet, but has been converted into a Java Web Start application.
[32916]8
9Instructions for using the GLI Java Web Start, which works over the JNLP protocol, are below.
10
111. Follow the instructions at http://wiki.greenstone.org/doku.php?id=en:release:3.09_release_notes#setting_up_a_remote_greenstone_3_server for setting up the Remote GS Server
12
132. Next, generate the SignedGatherer.jar:
14a. Use a terminal to go into the Greenstone "gli" directory, then run
15 keytool -genkey -alias privateKey -keystore appletstore -storepass greenstone
16Enter the appropriate details for your organization. When it asks to enter the key password for <privateKey>, choose your own password or hit Enter to use "greenstone".
17b. Next, run
18 jarsigner -keystore appletstore -signedjar SignedGatherer.jar GLI.jar privateKey
19When it prompts, enter the password you used in step 2a above.
20
213. Move the created SignedGatherer.jar file from the gli directory into GS3's web/applet subdirectory.
22
234. You need to associate JNLP files with Java Web Start (jre/bin/javaws).
24
25 - On Windows, create the association in the usual way: when you first access the GLI Web Start application through Greenstone,
26 a JNLP file called "GLIappWebStart.jnlp" will be offered for launching or download.
27 If JavaWS is not already the default application to open JNLP files with, rightclick on the downloaded GLIappWebStart.jnlp file
28 and choose Launch/Open with 
.
29 Browse to your Greenstone3's packages/jre/bin/javaws.exe or any installed Java's jre/bin/javaws.exe to use Java's Web Start application as the launcher.
[32138]30
[32916]31 - For Linux, create a file with .desktop extension (e.g. "javawebstart.desktop") containing the following, edit the path to javaws,
32 and save this file into ~/.local/share/applications:
[32136]33
[32916]34 --------------------------
35 FILE: javawebstart.desktop
36 --------------------------
37 # This file makes Ubuntu associate .jnlp files with Java Web Start (javaws)
38 # This file should be adjusted and then copied into ~/.local/share/applications
39 # as a file with .desktop extension, e.g. javawebstart.desktop
40 # https://askubuntu.com/questions/235861/how-to-associate-jnlp-file-with-javaws
41 [Desktop Entry]
42 Encoding=UTF-8
43 Name=Java 7 Web Start
44 Comment=Java 7 Web Start
[32917]45 Exec=/EDIT-THIS-PATH-TO-YOUR-JRE/bin/javaws %u
[32916]46 Terminal=false
47 Type=Application
48 Icon=javaws
49 Categories=Application;Network;
50 MimeType=application/x-java-jnlp-file;
51 --------------------------
52
[32917]535. Launch the Java Control Panel by running jre/bin/javacpl.exe on Windows, or jre/bin/jcontrol (formerly jre/bin/ControlPanel) on Linux.
[32916]54(GS3 binaries now include a JRE in the packages folder if you want to use the bundled JRE.)
55In the Java Control Panel, go to the Security tab, set Security level to High if not already set.
56Click Edit Site List, and then press Add to add the host:port that the GS3 will run on.
57Remember, to be accessible to the outside world, the host can't be "localhost", but would be the hostname of your machine or public IP.
58
596. Make the GLI link on the home page active: Open web/interfaces/default/transform/pages/home.xsl for editing, find the line
60
61 <!--<gslib:libraryInterfaceLink/><br/><br/>-->
62
63 and remove the comments. i.e. change it to
64
65 <gslib:libraryInterfaceLink/><br/><br/>
66
677. Start up the GS3 web server and visit your DL library home page, http://[hostname]:8383/greenstone3/library.
68
698. Since you have set up the JNLP file association in a previous step, you can now click on the "The Librarian Interface" link
[32917]70and your browser should offer to save or launch a file called GLIappWebStart.jnlp. Click ''Open With'' and in the dropdown box beside it, one of the launcher applications should, at least on Windows, be the "Java(TM) Web Start Launcher" application (javaws) that you associated with .jnlp file extensions. Choose that application as the launcher.
[32916]71If the browser is able to successfully launch it, Java Web Start will be used to run the GLI application indicated by the JNLP file.
[32917]72If launching through the browser is not possible, for example, if the launcher application is not listed, as may happen on Linux machines, then choose to save the JNLP file.
[32916]73It will download the file to a temporary user area (like C:\Users\<user>\AppData\Local\Temp on windows).
74And then you can rightclick on the downloaded GLIappWebStart.jnlp file, to launch it with the Java Web Start program you already
[32917]75associated with this file type. This way should work on both Linux and Windows.
[32916]76
779. After authorising the GLI to run, the JNLP version of the GLI Applet will eventually run and behave like the usual client-GLI
78(and like the old GLI applet) from this point onward. Refer to the client-gli section of
79http://wiki.greenstone.org/doku.php?id=en:release:3.09_release_notes#setting_up_a_remote_greenstone_3_server
80
81
[32138]82--------------------------
[32136]83LINKS
[32138]84--------------------------
[32136]85Reading on Java Web Start and Java Native Launch protocol (JNLP). The relationship between Java Web Start and JNLP:
86https://docs.oracle.com/cd/E84882_01/otn/pdf/E84699_01.pdf
87"Java Web Start is a technology that builds on the file association facilities of browsers through the use of Java Native Launch Protocol."
88
89
90Google search: Migrate Java 1.9 webstart
91
[32137]92https://docs.oracle.com/javase/9/whatsnew/toc.htm
93https://docs.oracle.com/javase/9/deploy/migrating-java-applets-jnlp.htm
[32139]94 section "Migrating an Existing Java Applet"
[32137]95https://docs.oracle.com/javase/9/deploy/self-contained-application-packaging.htm
[32136]96http://www.oracle.com/technetwork/java/javase/migratingfromapplets-2872444.pdf
[32137]97https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/applet_dev_guide.html
[32136]98https://dzone.com/articles/java-web-start-jnlp-hello
99
100https://docs.oracle.com/javase/tutorial/uiswing/examples/misc/index.html
101https://bugs.openjdk.java.net/browse/JDK-8178799
102https://www.v3.co.uk/v3-uk/news/2443810/oracle-signals-the-end-of-java-applet-support-for-browsers
103https://schneide.wordpress.com/2016/10/11/the-migration-path-for-java-applets/
[32137]104https://docs.oracle.com/javase/9/deploy/jnlp-file-syntax.htm
[32136]105https://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/embeddingJNLPFileInWebPage.html
106https://stackoverflow.com/questions/7313317/jnlp-as-a-applet-in-html-page
107
108https://stackoverflow.com/questions/17338711/jarsigner-manifest-permissions
109https://stackoverflow.com/questions/19659134/how-do-i-fix-missing-codebase-permissions-and-application-name-manifest-attri
110https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/manifest.html#codebase
111https://docs.oracle.com/javase/tutorial/deployment/jar/modman.html
112https://docs.oracle.com/javase/tutorial/deployment/jar/build.html
113https://stackoverflow.com/questions/18907695/ioexception-invalid-header-field-when-creating-jar-file-with-manifest
114https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html
115https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#JARManifest
116https://community.oracle.com/thread/1536875?start=0
[32139]117
118https://stackoverflow.com/questions/1199211/java-webstart-with-parameters
119https://stackoverflow.com/questions/14116640/how-to-use-jnlp-to-pass-command-line-arguments-to-the-application
[32918]120
121
122IMPORTANT: links for deleting keystores to regenerate from scratch
123* https://www.tbs-certificates.co.uk/FAQ/en/supprimer-certificat-keystore-java.html
[32919]124
125 1. Make a work copy of your keystore on which we're going to make modifications.
126 2. Identify the problematic alias with the following command: "keytool -list -v -keystore <keystoreCopy.jks>". In our case:
127
128 keytool -list -v -keystore appletstore
129
130 3. Remove the alias from the certificate: "keytool -delete -alias <aliasToRemove> -keystore <keystoreCopy.jks>". In our case:
131 keytool -delete -alias privateKey -keystore appletstore
132
133 4. Replace your server's keystore by your copy.
134
135* https://superuser.com/questions/1061638/where-are-certificate-private-keys-stored-in-windows-7
Note: See TracBrowser for help on using the repository browser.