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

查看:92
本文介绍了是否为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.

有没有可用的工具?

推荐答案

这只是一个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天全站免登陆