Install Java SE Development Kit to run your code.
Install Apache Tomcat to launch the server.
A good tutorial on how to setup your Tomcat server can be found here. This tutorial is using Tomcat version 8 but it will apply for all newer versions as well.
Now we need a JAVA IDE to write the code. In order to create a web application, this tutorial will use Eclipse Java EE IDE for Web Developers version Oxygen.2 Release (4.7.2).
For this tutorial, use all default install options.
Next: Authentication