JNLP 推荐服务器

发布于 2024-11-24 18:12:15 字数 246 浏览 1 评论 0原文

我从未使用过 JNLP,而且我还没有运行任何 Web/war 服务器,因此我将从头开始安装它:

使用哪个?

  • GlassFish
  • Tomcat
  • Apache
  • Jetty
  • 另一个?

我想知道已经使用 JNLP 的人是否可以为服务器提出任何建议。

我只想要一个空白页面,中间有一个用于启动应用程序的按钮,仅此而已。

I have never used JNLP, and I have no web/war server already running so I will install it from sratch:

Which to use?

  • GlassFish
  • Tomcat
  • Apache
  • Jetty
  • Another?

I wonder if someone already using JNLP could make any recomendation for the server.

I just want a blank page with a button in the middle for starting the application nothing more, nothing less.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

终遇你 2024-12-01 18:12:15

如果您仅使用 JNLP,则不需要 Java 服务器。 JNLP 是客户端。像 Apache HTTP Server 这样的简单 http 服务器应该没问题。 HTTP 服务器将是比使用 Web 容器/Java EE 服务器更好的解决方案,因为 JNLP(通常)是静态内容。即使是 lighthttpd 也应该足够了。

If you use only JNLP you don't need Java server. JNLP is client side. Simple http server like Apache HTTP Server should be OK. HTTP server will be better solution than use of web container/Java EE server because JNLP (usually) is a static content. Even lighthttpd should be enough.

离鸿 2024-12-01 18:12:15

正如已经说过的,任何能够提供 HTTP 服务的服务器都可以。如果您的 WebStart 应用程序本身没有签名(即您对相应的 Jar 文件进行了代码签名),您可能会考虑通过 HTTPS 发布 JNLP 及其资源。这样您的客户就会知道他们将要执行的软件来自其合法来源。尽管未签名的 WebStart 应用程序在客户端计算机上的权限受到限制,但它仍然是赢得客户端信任的一种措施。另一方面,这需要对您选择的服务器进行更多配置。

如果您的应用程序需要在客户端计算机上获得一些扩展权限,例如访问文件系统,那么我建议您对 jar 文件进行签名以自动获得必要的权限(不要忘记在 JNLP 中的元素中指定它们) )。

以下是未签名的 WebStart 应用程序的默认限制:

  • 无法访问本地磁盘。
  • 您的所有 jar 必须从同一主机下载。但请注意,您可以从任何主机下载扩展和 JRE,只要它们经过签名且受信任。
  • 仅允许下载 jar 的主机进行网络连接。 (“电话主页限制。”)
  • 无法安装安全管理器。
  • 没有本机库(甚至在扩展中也没有)。
  • 对系统属性的访问受到限制。 (应用程序具有对 jnlp 文件中定义的所有系统属性的读/写访问权限,以及对与小程序相同的属性集的只读访问权限

As already stated any server capable to serve HTTP will do. If your WebStart application is not signed by itself (i.e. you code-signed the corresponding Jar files) you could probably consider to publish the JNLP plus its resources via HTTPS. This way your clients will know that the software they are going to execute came from its rightful origin. Although unsigned WebStart applications are restricted in their privileges on the client's machine it still is a measure to elicit trust in your clients. On the other hand this requires more configuration effort with regard to the server you chose.

If your application will need some extended privileges on the client's machine such as access to the file system then I would recommend that you do sign your jar files to gain the necessary privileges automatically (don't forget to specify them in a element within your JNLP).

These are the default restrictions for unsigned WebStart apps:

  • No access to local disk.
  • All your jars must be downloaded from the same host. Note, however, that you can download extensions and JREs from any host as long as they are signed and trusted.
  • Network connections are allowed only to host from which your jars were downloaded. ("Phone home restriction.")
  • No security manager can be installed.
  • No native libraries (not even in extensions).
  • Limited access to system properties. (The application has read/write access to all system properties defined in the jnlp file, as well as read-only access to the same set of properties as applets
素罗衫 2024-12-01 18:12:15

你不需要服务器来运行 JNLP(Webstart).. 这就是 webstart 的工作原理,

它只是一个可以通过网络启动的应用程序,这将是从用户角度来看的过程:

用户访问 yourwebsite.com

用户看到的链接:运行我很棒的应用程序

用户单击链接,下载.jnlp文件

用户通过java web start运行jnlp文件(java SE的一部分,用户需要java运行时环境JRE来运行它)

java web start读取jnlp以获取有关的信息保存相应应用程序 jar 文件的服务器

会自动下载(第一次),然后应用程序启动,

用户感到无聊并

在第二天关闭应用程序,用户回来并再次单击您的链接

应用程序已经下载,因此它会立即启动

用户再次感到无聊并

在 1 天后关闭您的应用程序,您决定更新您的应用程序并将新的 jar 文件部署在您的
替换旧文件之一

服务器,在 2 天用户再次单击您的链接后

java web start 识别出用户有不同的版本,自动下载更新并再次启动应用程序
...
..

You dont need a server to run JNLP(Webstart).. This is how webstart works

it simply is an application that can be started over the web, this would be the procedure from the user perspective:

user goes to yourwebsite.com

user see's link: run my awesome app

user clicks link, which downloads .jnlp file

user runs the jnlp file through java web start (part of java SE, user requires java runtime environment JRE to run this)

java web start reads jnlp to get information about the server that holds the corresponding application

jar files get downloaded automatically (the first time) and then the application starts

user gets bored and closes application

the next day, user comes back and clicks your link again

application is already downloaded, so it starts right away

user gets bored again and closes your application

1 day later, you decide to update your application and you deploy the new jar file on your
server, replacing one of the old files

after 2 days user clicks your link again

java web start recognizes that the user has a different version, downloads update automatically and starts the application again
...
..
.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文