我正在尝试在 GWT Jetty 开发模式下执行以下代码
final SSLContext sslContext = SSLContext.getInstance(PROTOCOL);
sslContext.init(null, trustManagerFactory.getTrustManagers(), null);
SSLContext.setDefault(sslContext);
但我得到了这个例外
SEVERE: javax.servlet.ServletContext log: unavailable
java.security.AccessControlException: access denied (javax.net.ssl.SSLPermission setDefaultSSLContext)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:301)
at javax.net.ssl.SSLContext.setDefault(SSLContext.java:91)