---
title: "在Tomcat中强制web应用程序使用SSL"
author: "bluesfeng"
date: "2010-08-18T23:58:54Z"
tags: []
categories: ["企业架构"]
slug: "tomcat-web-ssl"
draft: false
lastmod: "2010-08-23T06:17:24Z"
id: 740633
url: "https://bluesfeng.iteye.com/blog/740633"
---

在应用程序的配置文件web.xml中的之前加入:

 

```
	<security-constraint>
	  <web-resource-collection>
		<web-resource-name>Restricted URLs</web-resource-name>
		<url-pattern>/</url-pattern>
	  </web-resource-collection>
	  <user-data-constraint>
		<transport-guarantee>CONFIDENTIAL</transport-guarantee>
	  </user-data-constraint>
	</security-constraint>
```

关键字：Tomcat, SSL, Web, 配置