In this article we will learn how to create a Web fragment XML file (web-fragment.xml) and how to make it default for all applications deployed on WildFly by using a the deployment-overlay feature.
In some cases it may be necessary to redirect your incoming HTTP traffic to HTTPS to ensure that your connection is encrypted. Let’s see what changes are required in your Undertow configuration to allow automatic redirection from HTTP to HTTPS.
HSTS stands for HTTP Strict Transport Security. It is a method used by websites to declare that they should only be accessible using a secure connection (HTTPS). If a website declares an HSTS policy, the browser should reject all HTTP connections and prevent users from accepting insecure SSL certificates. In this tutorial we will learn how to configure in on WildFly Web server.
This articles discusses about Cross-origin HTTP requests (CORS) and how they can be enabled on WildFly. Let0s start with some definitions: a cross-origin HTTP request is one that is made to: A different domain (for example, from acme.com to amazon.com). A different subdomain (for example, from acme.com to home.acme.com). A different port (for example, from … Read more
This short article describes how you can set the SameSite property in HTTP Cookies for Web applications, with special focus on WildFly‘s Web server, which is Undertow. What is SameSite ? SameSite is a property that can be set in HTTP cookies to avoid false cross-site request (CSRF) attacks in web applications: When SameSite is … Read more
Vaadin is an open source Java web framework with a large set of Web Components and Java EE supported with CDI integration. Let’s see how to get started with it to create a sample Web application which will run on WildFly. The simplest way to get started with Vaadin is by creating a new Vaadin … Read more
WildFly uses Undertow as Web server. In order to configure the amount of threads used by Web applications, we can define a Worker Thread from the io subsystem and use the Worker Thread for its HTTP listeners or just for single applications. In this tutorial we will learn how to do it. Out of the … Read more
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 do … Read more
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
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