Dynamicly generate a JNLP file for a Java Web Start application?

早过忘川 提交于 2020-01-15 06:18:25

问题


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?


回答1:


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.




回答2:


Have you seen the JnlpDownloadServlet?

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/downloadservletguide.html

It can dynamically insert properties into the JNLP file that it serves up. It may not do exactly what you want it to do right now but its not too difficult to modify.



来源:https://stackoverflow.com/questions/986595/dynamicly-generate-a-jnlp-file-for-a-java-web-start-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!