为 Java Web Start 应用程序动态生成 JNLP 文件? [英] Dynamicly generate a JNLP file for a Java Web Start application?

查看:35
本文介绍了为 Java Web Start 应用程序动态生成 JNLP 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个 servlet 来返回一个 JNLP 文件,其中包含要传递给 Web 启动程序的几个动态生成的参数.现在我的代码使用股票模板和令牌替换,但我必须认为有一种方法可以在 servlet 中以编程方式生成此文件.

I'm writing a servlet to return a JNLP file with several dynamically generated parameters to be passed to a web start program. Right now my code uses a stock template and token replacement, but I have to think there is a way to generate this file programmaticly within a servlet.

是否有任何可用的工具?

Are there any tools available for this?

推荐答案

它只是一个 XML 文件,所以我认为有多种方法可以做到这一点,从您的令牌替换想法到像 freemarker 这样的完整模板语言,或使用程序化 DOM 生成.它似乎不够复杂,不足以保证有自己的专用 API.

It's just an XML file, so I'd have thought there are various ways to do this, from your token-replace idea to a full template language like freemarker, or using programmatic DOM generation. It's doesn't seem complex enough to warrant a dedicated API of its own.

这篇关于为 Java Web Start 应用程序动态生成 JNLP 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆