-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathJnlpBuilder
105 lines (71 loc) · 6.43 KB
/
JnlpBuilder
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
JNLP Builder Readme
===================
* Description: construct a Java WebStart file from a {*.jnlp} file template
* Syntax: [scheme]://[ServerPath] [:port] [/ContextPath] [/ServletPath] [?query]
[scheme] = http
[ServerPath] [:port] = [ServerUrl]
[ServerUrl] [/ContextPath] = WebContext Root where Servlet is deployed
[/ServletPath] = launcherTemplate filePath inside Servlet Context (suffix must be .jnlp)
If file name is not explicitly defined, this path must end with "/" and
"launcher.jnlp" will be used as default name
[?query] = query parameters (optional and overrides default parameters)
[?src=templatePath] = New JNLP templatePath, if starts with "/", relative path from within the same server
is used with this new contextPath.
This path must end with "/" if default file name "launcher.jnlp" has to be used.
[?cdb=codeBasePath] = New codeBasePath, if starts with "/", relative path from within the same server
is used with this new ContextPath.
If not defined codeBasePath = templatePath (without template file name).
This path can finish with or without "/"
Note : CodeBase is injected in the new build JNLP, this is where all the resources will be launched from
[?cdb-ext=codeBaseExtPath] = Same as codeBasePath above. If not defined codeBaseExtPath = codeBasePath with suffix "-ext"
[?arg=value] = Argument "value" is added to the JNLP TAG <application-desc><argument> (can be multiple)
Each value is added to "main" application launched function as argument.
[?pro=name value] = Property "name" and "value" are added to the JNLP TAG <resources><property> (can be multiple)
Each property is added to System.Property variable that can be read from the application launched.
[?ihs=value] = Stands for "initial heap size" and "maximum heap size" defined in the JNLP TAG <resources><j2se>
and Default values are ihs=128m and mhs=512m.
[?mhs=value] If "m" suffix is not explicitly defined it is automatically added
Note: Each query parameter must be separated with "&" as defined by standard URL specifications.
Any other query name than those defined above can be used as a marker with value injected in place of.
When a file is not located on a web server, for example on a file system in the local network, the correct URL syntax is :
file:/// [//hostname] [/directory shared name] [/filename]
(file must previously be shared on host machine with enough access right)
Note: Following marker can be used in JNLP template <resources> and <application-desc> child TAGs, even if not given in query parameters
since they're automatically set with default values in the servlet "jnlp-builder".
If TAG contains "${cdb}" the codeBasePath is explicitly injected instead of key word marker
If TAG contains "${cdb-ext}" the codeBaseExtPath is explicitly injected instead of key word marker
If TAG contains "${svr}" the ServerURL is explicitly injected instead of key word marker
Idem for "${ihs}" and ${mhs} for setting Initial Heap Size and Maximum Heap Size
---------------------------------------------------------------------------------------------------------------------------
EX : http://localhost:8080/weasis-pacs-connector/
Servlet will build JNLP from "http://localhost:8080/weasis-pacs-connector/weasis.jnlp"
Codebase injected will be "http://localhost:8080/weasis-pacs-connector"
---------------------------------------------------------------------------------------------------------------------------
EX : http://localhost:8080/weasis-pacs-connector/application1/
Servlet will build JNLP from "http://localhost:8080/weasis-pacs-connector/application1/weasis.jnlp"
Codebase injected will be "http://localhost:8080/weasis-pacs-connector/application1"
---------------------------------------------------------------------------------------------------------------------------
EX : http://localhost:8080/weasis-pacs-connector/application2/test.jnlp
Servlet will build JNLP from "http://localhost:8080/weasis-pacs-connector/application2/test.jnlp"
Codebase injected will be "http://localhost:8080/weasis-pacs-connector/application2"
---------------------------------------------------------------------------------------------------------------------------
EX : http://localhost:8080/weasis-pacs-connector/?src=/newWebContext/application1/&arg=1erArgument
Servlet will build JNLP from "http://localhost:8080/newWebContext/application1/weasis.jnlp"
Codebase injected will be "http://localhost:8080/newWebContext/application1"
Argument added value is "1erArgument"
---------------------------------------------------------------------------------------------------------------------------
EX : http://localhost:8080/weasis-pacs-connector/?src=http://serveur.com:30541/photobox/test.jnlp
Servlet will build JNLP from "http://serveur.com:30541/photobox/test.jnlp"
Codebase injected will be "http://serveur.com:30541/photobox"
---------------------------------------------------------------------------------------------------------------------------
EX : http://localhost:8080/weasis-pacs-connector/?cdb=/newWebContext/application1&pro=testConfig+file://///hostname/webroot/config.properties
Servlet will build JNLP from "http://localhost:8080/weasis-pacs-connector/weasis.jnlp"
Codebase injected will be "http://localhost:8080/newWebContext/application1"
Property added is name=testConfig value=file://///hostname/webroot/config.properties
---------------------------------------------------------------------------------------------------------------------------
EX : http://localhost:8080/weasis-pacs-connector/newConfigLauncher.jnlp?cdb=/newWebContext/application2&pro=testConfig+${cdb}/conf/config.properties&arg=1erArgument&pro=jnlp.weasis.weasis.help.url+${svr}/weasis-doc/
Servlet will build JNLP from "http://localhost:8080/weasis-pacs-connector/newConfigLauncher.jnlp"
Codebase injected will be "http://localhost:8080/newWebContext/application2"
Property added is name=testConfig value=http://localhost:8080/newWebContext/application2/conf/config.properties
Argument added value is "1erArgument"
Property added is name=jnlp.weasis.weasis.help.url value=http://localhost:8080/weasis-doc/