在 jnlp 文件上传递参数

发布于 2024-09-24 21:05:49 字数 455 浏览 0 评论 0原文

是否可以在 JNLP 文件上传递类似 Maven 的参数?

   <jnlp spec="1.0+" codebase="${javafxCodebase}" href="Foo.jnlp">
   <information>
      <title>${javafxTitle}</title>
      <vendor>${javafxVendor}</vendor>
       ...
   </information>
   ... 
   </jnlp>

如果是这样,谁将这些数据传递到 jnlp 文件?我想到的是:

   http://localhost:8080/Foo.jnlp?javafxCodebase=bar&javafxTitle=baz

Is it possible to pass maven-like arguments on a JNLP file?

   <jnlp spec="1.0+" codebase="${javafxCodebase}" href="Foo.jnlp">
   <information>
      <title>${javafxTitle}</title>
      <vendor>${javafxVendor}</vendor>
       ...
   </information>
   ... 
   </jnlp>

And if so, who will pass these data to the jnlp file? What comes to mind is:

   http://localhost:8080/Foo.jnlp?javafxCodebase=bar&javafxTitle=baz

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

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

发布评论

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

评论(2

决绝 2024-10-01 21:05:49

Java Webstart 不提供对此开箱即用的支持。有一个JNLP Download Servlet但是它仅支持有限的宏集,并且不能包含任何用户定义的宏。

我认为最好的方法是使用像 Velocity 这样的模板引擎编写自己的 servlet 来生成 JNLP 文件即时并用您所需的参数填充它。

There is no support for this out of the box with Java Webstart. There is a JNLP Download Servlet but it only supports a limited set of macros and cannot have any that are user defined.

I think your best approach would be to use a templating engine like Velocity to write your own servlet for generating the JNLP file on the fly and populating it with your required arguments.

相思碎 2024-10-01 21:05:49

您还可以在此网站上尝试 php 脚本。

我发现自动检测我的代码库 url 很有用,因为我需要在不同的服务器上部署 jnlp 文件。

You can also try the php script on this website.

I found it useful to automatically detect my codebase url, since I had a requirement to deploy the jnlp files on different servers.

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