如果你的webapp需要只能够进行https方式访问,那么在webapp的web.xml里加上
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>must https</web-resource-name>
- <url-pattern>/lizongbo/*</url-pattern>
- </web-resource-collection>
- <user-data-constraint>
- <transport-guarantee>CONFIDENTIAL</transport-guarantee>
- </user-data-constraint>
- </security-constraint>