Jboss provides a way to intercept all web requests before they are dispatched to appropriate contexts.
Valve is a component that will be inserted into the request processing pipeline.
You can configure a valve(jboss provides a number of valves which you can use accoriding to your need) in the standalone.xml in the following section.
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
<ssl/>
</connector>
<valve name="myvalve" module="org.jboss.web-valves" class-name="org.apache.catalina.valves.AccessLogValve">
</valve>
</subsystem>
You can also write a custom valve to suit your requirement.
You need in extend the ValveBase class in order to do so, and then implement the invoke method.
Example:
package org.apache.catalina.valves;
import java.io.IOException;
import javax.servlet.ServletException;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
public class CustomValve extends ValveBase {
public void invoke(Request request, Response response)
throws IOException, ServletException{
// Add custom logic here
getNext().invoke(request, response);
}
}
Then package this into a jar and add this as a module in the modules subsystem in jboss.
├── jboss-eap └── modules └── system └── layers └── base └── org └── jboss └── web-valves └── main └── valves.jar └── modules.xml

Does Jboss provide automatic scrips for configuring the environment?
LikeLike
i think you can have cli commands scripted in a sh file to configure an environment
LikeLike
I see you don’t monetize your site, don’t waste your traffic, you can earn extra cash every month
because you’ve got hi quality content. If you want to
know how to make extra money, search for: best adsense
alternative Wrastain’s tools
LikeLike