<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" address="{名称}" sslProtocol="TLS" clientAuth="false" keystorePass="{密码}" keystoreType="PKCS12" keystoreFile="{路径}" secure="true" scheme="https" SSLEnabled="true" maxThreads="150"/>
<Host name="{名称}" appBase="blog" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="" docbase="{路径}" crosscontext="true" /> </Host>
<—————————–以上为server.xml中—————————————->
以下为在web.xml中
<security-constraint> <!-- Authorization setting for SSL --> <web-resource-collection > <web-resource-name >SSL</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>