Setting up a Tomcat behind a reverse proxy

There are various good reasons to place your Java web application that is running in the Apache Tomcat behind a reverse proxy: Load balancing, implementing a TLS termination proxy or adding a web application firewall to the mix are some examples.

Java: Lazy initialize a collection with Optional

In this short advice I would like to show you how to create null-safe code when working with unset data in a Java Bean or some API that you are using which may return a null reference. It will be an easy to read one liner.