Remove H2 JDBC-Driver from EAP6

To remove the H2 JDBC-driver from your EAP6 simply remove the relevant part from your standalone.xml:

Or with cli:


Remove ExampleDS datasource in EAP6

To remove the ExampleDS datasource simply remove the relevant part from your standalone.xml:

Or with cli:


Configure Aliases in EAP6

The default configuration states localhost and as aliases. To change this you have to simply change or remove the specific parts of your virtual-server config in your standalone.xml:

This would only be a single alias with value localhost (and disabled welcome root).

Or to change it with cli:


Disable welcome-root in EAP6

To remove the default welcome page your have to change your virtual server config in your standalone.xml to state enable-welcome-root=”false”:

Or with cli:


Change SERVER header in EAP6

I found no way to remove the Server header in EAP6. But there is a way to change its content. Just add the folling config to your standalone.xml:

Or with cli:

Then your header just is Server: foo instead.

Remove X_POWERED_BY Header in JBoss EAP6

First you have to disable it in standalone.xml by adding jsp-configuration x-powered-by=”false”. Here the relevant part of my config:

Or with cli:

In a JSF application you have to add the following context param:

Then start your server and the header should be gone.

Make your webapplication log debug messages under jboss

I often catch myself writing info-messages because jboss is configured to info-mode by default. By adding the following few lines you can make your application use debug mode:

Of course you have to change the category (your package name) in the logger. The snippet is from Wildfly 8.1. But it is the same approach for JBoss AS 7+.

Get rid of Wildfly/JBoss headers “Server” and “X-Powered-By”

If you don’t want to send these headers with every response you have to disable them in your configuration file (standalone.xml).

I just removed the following lines from my undertow subsystem (urn:jboss:domain:undertow:1.1):

After a server restart the headers were gone.

JBoss Login Configuration

Here a short example for a security-domain that has to be configured in the urn:jboss:domain:security subsystem:

To use the domain in your application here an example jboss-web.xml descriptor:

JBoss JDBC Module Creator

Every time I download a new jboss I have to add the needed jdbc module manually. And every time I have to look how the module.xml has to look like. So I decided to write a simple script that creates a module for PostgreSQL. with some configuration, it should be capable of creating every jdbc module you want. Just see the options it supports.

You can see my project at github:

Here some instructions how to run it with default options:

[codesyntax lang=”bash”]