【发布时间】:2021-04-05 09:48:37
【问题描述】:
我必须将 Java Web 应用程序从 HTTP“迁移”到 HTTPS。在本地,我使用 Tomcat 进行开发,但在测试和生产环境 - WebSphere。
我在其他一些问题中看到了相同的答案,我们只需要在web.xml 中设置以下参数化:
<security-constraint>
<web-resource-collection>
<web-resource-name>AuthServer</web-resource-name>
<url-pattern>/Server</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
如果我只使用此代码,应用程序将使用哪个证书?
除了web.xml中的上述代码之外,我还需要在服务器上设置一些认证吗?
【问题讨论】:
标签: java servlets https ssl-certificate