jnlp href 属性中的 url 参数 [英] url parameters in jnlp href attribute
问题描述
我一直在使用 url 参数将参数传递给 .jar 应用程序的主方法.在 Windows 7 上更新到最新的 jre 7u7 后,Java-web-start 启动器在启动文件时崩溃.
I've been using url parameters to pass arguments to the main-method of the .jar application. After updating to latest jre 7u7 on windows 7, Java-web-start launcher crashes when launching the files.
(JNLP download-servlet 和 jsp-page 解析 url-parameters 并将它们输入到进一步向下的参数中)
(JNLP download-servlet and jsp-page parses the url-parameters and inputs them in the argument further down)
jsp 有趣的部分
<jnlp spec="6.0+" codebase="http://localhost:8080/" href="myfile.jnlp?username=charles">
...
<application-desc main-class="MyMain">
<argument><%=request.getParameter("username")%></argument>
</application-desc>
</jnlp>
所以这可能是也可能不是错误,
So this might or might not be a bug,
问题 1:我是否以正确的方式使用了 href 属性?
Q1: have I been using the href-attribute in a correct way?
Q2:有什么聪明的想法来解决这个问题吗?
Q2: Any smart ideas how to get around the problem?
推荐答案
我今天遇到了同样的问题.我在网上没有找到任何东西,但我试图替换?"使用 HTML 实体 '?'它有效.
I get the same problem today. I didn't find anything on the net, but I tried to replace the '?' with the HTML entity '?' and it works.
这篇关于jnlp href 属性中的 url 参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!