有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

从JBOSS 7.1.1升级到Wildfly 8.2.1的java问题

在我之前的项目中,我们使用JBoss7作为应用服务器,我的应用程序在jboss web中有如下代码。xml

<jboss-web>
  <security-domain>my-form-auth</security-domain>
  <context-root>webapps</context-root>
  <valve>
    <class-name>com.session.MyAuthenticaor</class-name>
 </valve>
</jboss-web>

它工作得很好。但是目前我们升级到了wildfly 8.2.1,没有收到任何请求。该阀用于自定义身份验证。阀门代码如下所示

包com。会议

import java.io.IOException;

import org.apache.catalina.authenticator.FormAuthenticator;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;

public class MyAuthenticaor extends FormAuthenticator{

    public boolean authenticate(Request request, Response response,LoginConfig config) throws IOException {
        //code for authentication  
    }

}

请帮我解决这个问题


共 (1) 个答案

  1. # 1 楼答案

    必须单独配置阀门。web子系统下的xml文件。如下

    <valve name="<valve name>" module="<your valve module name>" class-name="com.session.MyAuthenticaor"></valve>