tomcat9配置ie文档格式
时间: 2023-12-10 20:03:11 浏览: 143
要配置Tomcat 9以支持IE文档格式,需要在Tomcat的配置文件中添加以下内容:
1. 打开Tomcat的配置文件server.xml,找到Connector节点,添加以下内容:
```
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
URIEncoding="UTF-8"
relaxedPathChars='[]|'
relaxedQueryChars='{}^\`"<>'
useBodyEncodingForURI="true"/>
```
2. 在web.xml文件中添加以下MIME类型:
```
<mime-mapping>
<extension>docx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xlsx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pptx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime-type>
</mime-mapping>
```
3. 重启Tomcat服务器。
完成以上步骤后,Tomcat 9将能够正确地处理IE文档格式。
阅读全文