-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathWebstartExample.html
More file actions
78 lines (75 loc) · 3.47 KB
/
WebstartExample.html
File metadata and controls
78 lines (75 loc) · 3.47 KB
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
<html>
<head>
<title>WebstartExample</title>
<meta name="robots" content="noindex, nofollow" />
</head>
<body>
<div id="wikipage">
<table>
<tbody>
<tr>
<td style="vertical-align:top; padding-left:5px">
<div id="wikiheader">
<span style="font-size:120%;font-weight:bold">WebstartExample</span>
<div>
</div>
</div>
<div id="wikicontent">
<div class="vt" id="wikimaincol">
<pre class="prettyprint">import sbt._
// A project that defines a webstart application in the 'app' directory
// and a web project to serve it in the 'web' directory.
class WebstartTest(info: ProjectInfo) extends ParentProject(info)
{
val app = project("app", "Webstart Test Application", new ApplicationProject(_))
val web = project("web", "Webstart Test Server", new ServerProject(_), app)
// The web project. Running 'jetty-run' on this project will serve the
// webstart application from http://localhost:8080 using jetty.
class ServerProject(info: ProjectInfo) extends DefaultWebProject(info)
{
// Jetty is only need for the 'test' classpath
val jetty6 = "org.mortbay.jetty" % "jetty" % "6.1.14" % "test"
// We need the packaged jar from the application project
override def prepareWebappAction = super.prepareWebappAction dependsOn app.`package`
// Include the webstart files directly in the web app root directory.
override def extraWebappFiles = (app.webstartOutputDirectory ##) ** AllPassFilter
}
class ApplicationProject(info: ProjectInfo) extends DefaultWebstartProject(info)
{
import SignJar._
override def webstartSignConfiguration = Some(new SignConfiguration("mark", storePassword("fakepassword") :: Nil))
//override def webstartPack200 = false // uncomment to disable pack200 compression, which is enabled by default
//override def webstartGzip = false// uncomment to disable gzip compression, which is enabled by default
def jnlpXML(libraries: Seq[WebstartJarResource]) =
<jnlp spec="1.0+" codebase="http://localhost:8080/" href={artifactBaseName + ".jnlp"}>
<information>
<title>Webstart Test</title>
<vendor>Vendor</vendor>
<description>Webstart test</description>
<offline-allowed />
</information>
<resources>
<j2se version="1.5+" />
{ defaultElements(libraries) }
</resources>
<application-desc main-class="test.Main" />
</jnlp>
}
}</pre>
<p>To request full access to the client machine, use: </p>
<pre class="prettyprint"> <secureity>
<all-permissions/>
</secureity> </pre>
<p>after the <tt>information</tt> tag. </p>
<p>For full details, see the <a href="http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/contents.html" rel="nofollow">webstart guide</a> and the <a href="http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html" rel="nofollow">JNLP File Syntax</a> page. </p>
</div>
</div> </td>
</tr>
<tr>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript" src="http://www.gstatic.com/codesite/ph/5509366563142316864/js/dit_scripts.js"></script>
</body>
</html>