嗨,我使用tomcat 6作爲網絡服務器。我有兩個webbapplication安裝在同一端口上的tomcat上。說App1和App2。 App1連接到 App2。然後App2再次使用jessionid連接到App1(所以app2發送的url是http://localhost/App1;jessionid=sessionidOfAp11) 只要我在http上,它就可以很好地工作。但是,只要我移動到https App2不能連接到App1與相同的網址。 另一個有趣的事實是,如果我在Brower上鍵入相同的URL,它將連接到App1。 我不明白這裏會有什麼祕密嗎?獲取javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException。無法連接到HTTPS上的應用程序?
編輯: - 這裏是確切的錯誤我得到
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 53 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
回答
傢伙感謝答覆。阿隆與ramesh答案我也不得不做http://www.coderanch.com/t/134384/Security/Getting-error-No-subject-alternative建議的東西。
「App1連接到App2」是什麼意思? – 2012-03-05 12:29:42
你對這兩個應用程序使用https嗎?還是僅適用於App2? – 2012-03-05 12:33:24
基本上點擊App1上的鏈接就可以進入App2。然後App2再次連接到App1檢查一些邏輯與api URLConnection conn = url.openConnection(); – 2012-03-05 12:37:37