我正在尝试为我的Java webstart应用程序创建https安全连接。我所做的只是配置我的Tomcat使用证书,我就完成了。我可以做到
“https:// nsjns:8443 / abc / xyz.jnlp”并且它下载了我的应用程序并且工作正常。
对于生产,我们购买了证书,此证书保存在负载均衡器上,负载均衡器后面的实际Web服务器。如果我使用浏览器,我可以看到服务器,并可以通过在浏览器中键入url来下载我的jnlp文件。但是,我无法使用Java webstart执行jnlp文件,因为我得到以下异常。
Java.io.IOException: Server returned HTTP response code: 503 for URL: "http://test.tec.com/abc.jnlp"
at sun.reflect.GeneratedConstructorAccessor13.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1672)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1670)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine._downloadCacheEntry(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.javaws.Launcher.updateFinalLaunchDesc(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.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://test.tec.com/abc.jnlp
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
... 17 more
它正在将我的网址从https解析为http。我是这一切的新手。请帮助我提出您的想法和建议。我缺少什么?
答案 0 :(得分:0)
不太可能与您的证书有关。尝试使用IP地址而不是webstart URL中的主机名。
您没有说明您正在运行webstart的平台,但如果IP地址有效,则启动webstart控制面板:javaws -viewer
并转到Java选项卡上的网络设置。假设它还没有这么说,请选择直接连接(即没有代理)并告诉我们之后是否有效。