Disable/Enable JSP Regeneration

To disable JSP regeneration (which is by default off in EAP6) simple add the following  to your web subsystem:

Or with cli:

Simply replace false with true to enable it.

Disable Deployment-Scanner in JBoss

Look for the deployment-scanner config in your standalone.xml and configure the scan interval to -1 to allow deployment onyl from shell or at startup. Here is the relevant part:

Or with cli:

 

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 example.com 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.

Ubuntu java installation/automatic updates

To install java and have it updated automatically just use the WebUpd8 PPA.

After that you have java 8 installed and it is updated regularly.

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+.