2016-01-24 38 views
1

我有問題(來自受信任的CA證書)部署簽名Applet上一個新的Web服務器。它在我的舊網站服務器上運行良好,但是當我將它傳輸到新主機時,它被Java安全設置阻止。簽名的小受阻與反向代理瀏覽器上(「未知源」)

我在HTML文件部署這樣的:

<div id="applet"> 
<script> 
    var attributes = {codebase:'http://ab123.wwwdns.example.com/Applet/', 
         code: 'db.main.ExApplet', 
         archive: 'ExampleApplet.jar', 
         width: '1150', 
         height: '700', 
         permissions: 'sandbox'}; 
    var parameters = {}; 
    var version = '1.6'; 
    deployJava.runApplet(attributes, parameters, version); 
</script> 
</div> 

我的清單文件包含以下行:

Manifest-Version: 1.0 
Application-Name: Example Name 
Permissions: sandbox 
Caller-Allowable-Codebase: *.example.com http://ab123.wwwdns.example.com http://other.example.com 
Codebase: *.example.com http://ab123.wwwdns.example.com http://other.example.com 
Application-Library-Allowable-Codebase: *.example.com http://ab123.wwwdns.example.com http://other.example.com 
Entry-Point: db.main.ExApplet 

(以前我只指定試過* .example.com的,但這個沒有任何工作)

我想這個問題是關係到一個事實,即小應用程序,現在可以通過兩個不同的URL來訪問(ab123.wwwdns.example.com和other.exampl e.com)?

這裏是從Java控制檯(Java的8更新71建設15插件在Firefox)的摘錄:

java.lang.reflect.InvocationTargetException 
... 
Caused by: com.sun.deploy.security.BlockedException: Your security settings have blocked an untrusted application from running 
    at com.sun.deploy.security.BlockedDialog.show(Unknown Source) 
    at com.sun.deploy.security.SandboxSecurity.checkRunUntrusted(Unknown Source) 
    at 
com.sun.deploy.security.SandboxSecurity.checkUnsignedSandboxSecurity(Unknown Source) 
... 

任何提示的歡迎!

回答

0

我終於解決了我的問題;我發現「未知源」錯誤是由於我無法找到我使用的外部庫。這是奇怪的,爲我所用完全相同的架構來訪問外部庫和我一樣老的服務器上,但在新服務器上這並沒有對一些(我未知)工作的原因所在。

這裏更改的列表,我做我的研究過程中,使小程序的工作,現在它的運行完全正常,希望這將幫助其他人誰與部署的小應用程序也存在問題:

  • 我刪除從我的HTML代碼庫屬性文件
  • 我用通配符* .example.com的在我的清單文件
  • 我感動了所有外部庫到同一文件夾中ExampleApplet.jar,此外並沒有將它們添加到ExampleApplet.jar檔案
  • 以前我有一個點(。)在我的類路徑屬性,這也是我刪除

HTML文件

<div id="applet"> 
<script> 
    var attributes = {code: 'db.main.ExApplet', 
         archive: 'ExampleApplet.jar', 
         width: '1150', 
         height: '700', 
         permissions: 'sandbox'}; 
    var parameters = {}; 
    var version = '1.6'; 
    deployJava.runApplet(attributes, parameters, version); 
</script> 
</div> 

清單文件

Manifest-Version: 1.0 
Application-Name: Example Name 
Permissions: sandbox 
Caller-Allowable-Codebase: *.example.com 
Codebase: *.example.com 
Application-Library-Allowable-Codebase: *.example.com 
Class-Path: external1.jar external2.jar 
Entry-Point: db.main.ExApplet 

(以前的類路徑已經看起來像這樣,並且其中下LIB位於/和內ExampleApplet.jar附加地)的外部庫:

Class-Path: . lib/external1.jar lib/external2.jar