Java Wildfly-8.2.1中的港口统一
我有一个EAR应用程序,它的结构如下 abc.earJava Wildfly-8.2.1中的港口统一,java,https,wildfly-8,ear,Java,Https,Wildfly 8,Ear,我有一个EAR应用程序,它的结构如下 abc.ear def.war 战争 ghi.jar 应用程序在Wildfly服务器上运行良好,如下所示: HTTP: HTTPS: 我想将所有HTTP(端口8080)请求重定向到HTTPS(端口8443)。 我们衷心感谢您的帮助 如果我理解正确,您有一个打包在EAR文件中的webapp。因此,您可以在webapp web.xml中添加以下内容: <security-constraint> <web-resource-colle
- def.war
- 战争
- ghi.jar
我们衷心感谢您的帮助 如果我理解正确,您有一个打包在EAR文件中的webapp。因此,您可以在webapp web.xml中添加以下内容:
<security-constraint>
<web-resource-collection>
<web-resource-name>everything</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
一切
/*
保密的
因此,如果用户通过浏览器使用http://...,它将被“重定向”到https://...
注意:您还必须在Wildfly security realms中配置SSL,但我假设您已经这样做了您是否选中了此选项?是的,但该链接仅有助于保护web应用程序。