在web.xml中添加如下:
<!-- add by jim --> <security-constraint> <web-resource-collection> <web-resource-name>SSL</web-resource-name>
<!-- 任意url --> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
服务器为resin,需要在confi.xml文件中添加
<http port='443'> <jsse-ssl> <key-store-file>dyxnettest.jks</key-store-file> <password>test123</password></jsse-ssl> </http>