How to deploy a Web application on the Root Context on WildFly?

WildFly users To deploy an application on the ROOT Web context, firstly you have to remove the default Welcome application from undertow’s server: /subsystem=undertow/server=default-server/host=default-host/location=\/:remove { “outcome” => “success”, “response-headers” => { “operation-requires-reload” => true, “process-state” => “reload-required” } } Reload the server: reload Next, if you can either set the ROOT Web context in your … Read more

How to deploy Java Web Start Applications on JBoss

INFO: Java Web Start (JWS) was deprecated in Java 9, and starting with Java 11, Oracle removed JWS from their JDK distributions. This means that clients that have the latest version of Java installed can no longer use JWS-based applications. And since public support of Java 8 has ended in Q2/2019, companies no longer get … Read more

Getting started with Struts 2 on WildFly

In this article we will learn how to run a Struts 2 application on WildFly application server. You will also find, at the end of it, the first article we wrote about JBoss and Struts which is related to Struts 1. Running Struts 2 on WildFly To get started quickly with Struts 2 on WildFly … Read more

How to install Tomcat Web Valves on JBoss

Important notice: this tutorial has been written for JBoss EAP 6 and JBoss AS 7. Apache Valves are not available anymore in WildFly application server. You can replace them with Undertow Handlers. Check this tutorial for more information: Converting Tomcat Valves to Undertow Handlers This tutorial shows how to create a Tomcat Valves and install … Read more

From Tomcat Valves to Undertow Handlers in a nutshell

Undertow doesn’t support the older JBoss Web valves, however most of them can be easily migrated to Undertow handlers. Here is a list of those valves and their corresponding Undertow handler: Valve Handler org.apache.catalina.valves.AccessLogValve io.undertow.server.handlers.accesslog.AccessLogHandler org.apache.catalina.valves.ExtendedAccessLogValve io.undertow.server.handlers.accesslog.AccessLogHandler org.apache.catalina.valves.RequestDumperValve io.undertow.server.handlers.RequestDumpingHandler org.apache.catalina.valves.RewriteValve io.undertow.server.handlers.SetAttributeHandler org.apache.catalina.valves.RemoteHostValve io.undertow.server.handlers.AccessControlListHandler org.apache.catalina.valves.RemoteAddrValve io.undertow.server.handlers.IPAddressAccessControlHandler org.apache.catalina.valves.RemoteIpValve io.undertow.server.handlers.ProxyPeerAddressHandler org.apache.catalina.valves.StuckThreadDetectionValve io.undertow.server.handlers.StuckThreadDetectionHandler org.apache.catalina.valves.CrawlerSessionManagerValve io.undertow.servlet.handlers.CrawlerSessionManagerHandler It is possible to … Read more

Writing a custom Undertow Handler

In this quick quick tutorial we will learn how to add a custom Handler to Undertow and then we will install it on WildFly as a module. The main Undertow functionality is provided by io.undertow.server.HttpHandler instances. These handlers can be chained together to form a complete server. In this example, we will add a TimedHandler … Read more

Configuring Proxy address forwarding with WildFly

This tutorial discusses how to configure Proxy address forwarding with WildFly’s Web server (Undertow). A common scenario in many architectures is to have WildFly server fronted by a reverse Proxy like Squid or Apache that maps the WildFly domain. What happens is that, if you are using for example a navigation rule in your application … Read more

Configuring no-request-timeout in WildFly

The no-request-timeout attribute specifies the length of time in milliseconds that a connection is idle before it is closed. The default value is 60000 milliseconds (1 minute). Here is how you can check its value: /subsystem=undertow/server=default-server/http-listener=default:read-attribute(name=no-request-timeout) { “outcome” => “success”, “result” => 60000 } And conversely you you can increase it: /subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=no-request-timeout, value=70000) Tuning this … Read more

Configuring max-post-size in WildFly

This tutorial will teach you how to configure the max-post-size in WildFly application server. Out of the box, the default max-post-size can be checked by the following CLI command, which queries the http listener: /subsystem=undertow/server=default-server/http-listener=default:read-resource(include-runtime=true) { “outcome” => “success”, “result” => { “allow-encoded-slash” => false, “max-parameters” => 1000, “max-post-size” => 10485760L, “max-processing-time” => 0L, “url-charset” … Read more

Configuring WildFly upload file size

If you implement a file upload in your web front end and want to send the data to the WildFly with HTTP POST, the WildFly will put a stop to it as soon as a certain file size is exceeded. The default value for the size of a POST request is 10MB. So how to … Read more