1.安装好tomacat后,输入  http://localhost:8080 .

https呢,需要道 tomcat/conf/server.xml增加

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/Users/menchao/myCert/server.keystore" keystorePass="123456"/>

 

2.在java web中开启https ,在web.xml中添加:

<security-constraint>

    <web-resource-collection>

        <web-resource-name>securedapp</web-resource-name>

        <url-pattern>/*</url-pattern>

    </web-resource-collection>

    <user-data-constraint>

        <transport-guarantee>CONFIDENTIAL</transport-guarantee>

    </user-data-constraint>

</security-constraint>

 

 

相关文章:

  • 2021-12-06
  • 2021-07-11
  • 2021-06-20
  • 2021-07-17
  • 2022-12-23
  • 2022-01-16
  • 2021-12-25
  • 2022-01-09
猜你喜欢
  • 2022-12-23
  • 2021-07-03
  • 2021-06-05
  • 2022-12-23
  • 2022-01-11
相关资源
相似解决方案