我在同一个tomcat服务器上运行多个war应用程序,启用了SSL,并且有最终的URL:
除此之外,还可以通过添加server.xml
来显示一个目录。
<Context docBase="../../rawdata" path="/rw"/>
但是尝试公开: http ://192.168.110.1: 8080 /rw/file1.bin。 基本上,我 DONOT 想要将其重定向到 https &amp;的 8443
我尝试在tomcat的web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>public</web-resource-name>
<url-pattern>/rw/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
但网址仍然通过SSL端口重定向。
我该怎样防止这种情况?提前谢谢。