How to Create a Valve for JBoss EAP

SampleValve.java

import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase;

public final class SampleValve extends ValveBase {

  @Override
  public void invoke(final Request request, final Response response) throws Exception {
    getNext().invoke(request, response);
  }

}

jboss-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
  <valve>
    <class-name>SampleValve</class-name>
  </valve>
</jboss-web>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s