Jakarta ee 如何在Wildfly 8.2中从http重定向到https?

Jakarta ee 如何在Wildfly 8.2中从http重定向到https?,jakarta-ee,redirect,seo,wildfly,Jakarta Ee,Redirect,Seo,Wildfly,My web.xml具有以下安全约束: <security-constraint> <web-resource-collection> <web-resource-name>App</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <

My web.xml具有以下安全约束:

<security-constraint> 
    <web-resource-collection>     
        <web-resource-name>App</web-resource-name> 
        <url-pattern>/*</url-pattern>
    </web-resource-collection> 
    <user-data-constraint> 
        <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
    </user-data-constraint> 
</security-constraint>

应用程序
/*
保密的

此配置通过302重定向将所有http URL重定向到https。除了通过Wildfly 8.2中的301重定向之外,还有其他方法可以实现同样的功能吗?

我可以想到的一种方法是在undertow中使用基于谓词的处理程序。请参见下面链接中的示例:


该示例解释了基于请求路径的可配置302响应。我想你可以调整它以返回301。

我唯一能想到的就是编辑“海底”本身……但不知道怎么做。你确实需要自定义。我现在只能从头顶上看不出实现的细节。@BalusC,我来看看这个方法。如果你能抽出时间举个例子,我将不胜感激。在此之前,我将继续阅读。在此期间,你是否找到了这个问题的答案@k170?@温度计,不幸的是,仍然没有答案。如果我真的找到了,我一定会把它贴出来。这真的对j_安全检查有用吗?我不这么认为。还是你自己试过?