Based on Java Servlets, Java EE.
- Download an Apache Tomcat archive (I recommend Tomcat 10.1).
- Build
.war
via Eclipse or other IDE, Text Editor. - Untar your Tomcat archive.
- Running:
- Run it with Eclipse on Apache Tomcat server that you've previously downloaded.
- Or copy your
.war
file to<your-tomcat-server-folder>/webapps/
.
Then run it with <your-tomcat-server-folder>/bin/startup.sh
.
See logs: tail -f <your-tomcat-server-folder>/logs/catalina.out
.
Shutdown: <your-tomcat-server-folder>/bin/shutdown.sh
.
P.S.: You can use the .war
file from that target folder.
- Then you just open in your browser
localhost:8080/basic-auth-ee/
(Obviously, with HTTP)
P.S.: Also you need change DB url, user, password in Context.java
.