1

jsp を介して jnlp を展開しようとしています jsp ファイルは次のようになります。

<%response.setContentType("application/x-java-jnlp-file");

String merchantId = request.getParameter("merchantId");
String restaurantId = request.getParameter("restaurantId");
System.out.println(merchantId+"::"+restaurantId); %>
<?xml version="1.0" encoding="utf-8"?> 
<jnlp spec="1.0+" codebase="http://menuzapp-dev-2.appspot.com/" >
    <information>
        <title>Menuzapp Printing</title>
        <vendor>YONG MOOK KIM</vendor>
        <homepage href="http://menuzapp-dev-2.appspot.com/" />
        <description>print tickets</description>
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
        <j2se version="1.6+" />
        <jar href="PrinterApplication.jar" main="true" />
        <jar href="bluecove-2.1.1-SNAPSHOT.jar"/>
        <jar href="gson-1.6.jar"/>
        <jar href="jackson-core-lgpl-1.7.2.jar"/>
        <jar href="jackson-mapper-lgpl-1.7.4.jar" />
    </resources>
    <application-desc main-class="com.PrinterApp" >
      <argument><% out.print(merchantId); %></argument>
      <argument><% out.print(restaurantId); %></argument>
    </application-desc>
</jnlp>

同じ証明書を使用してすべてのjarを認定しました。ローカルサーバーで実行しようとすると、jarが正常に起動しますが、サーバーのURLを変更すると、次のような例外が発生します。

<jnlp spec="1.0+" codebase="http://menuzapp-dev-2.appspot.com/">
  <information>
    <title>Menuzapp Printing</title>
    <vendor>YONG MOOK KIM</vendor>
    <homepage href="http://menuzapp-dev-2.appspot.com/"/>
    <description>print tickets</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <java version="1.6+"/>
    <jar href="http://menuzapp-dev-2.appspot.com/PrinterApplication.jar" download="eager" main="true"/>
    <jar href="http://menuzapp-dev-2.appspot.com/bluecove-2.1.1-SNAPSHOT.jar" download="eager" main="false"/>
    <jar href="http://menuzapp-dev-2.appspot.com/gson-1.6.jar" download="eager" main="false"/>
    <jar href="http://menuzapp-dev-2.appspot.com/jackson-core-lgpl-1.7.2.jar" download="eager" main="false"/>
    <jar href="http://menuzapp-dev-2.appspot.com/jackson-mapper-lgpl-1.7.4.jar" download="eager" main="false"/>
  </resources>
  <application-desc main-class="com.PrinterApp">
    <argument>SGXX.000001</argument>
    <argument>ag5tZW51emFwcC1kZXYtMnIRCxIKUkVTVEFVUkFOVBiwFQw</argument>
  </application-desc>
</jnlp> ]
    at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

ありがとう

4

0 に答える 0