I was experimenting with a Java application that can act as a web server and includes the user interface HTML-files that get modified with htmx, to replace certain parts of the HTML with other ones created in Java. I found it pretty hard to understand how to configure the Jetty, but as always with Java libraries, it's pretty easy once you understand how to do it ;-) I decided to share my example, so you don't need to go through the same search if you want to use the same approach...
Read the full description here:
webtechie.be/post/2024-03-28-...
Source code on GitHub:
github.com/FDelporte/java-jet...
Libraries used in this project:
eclipse.dev/jetty/
htmx.org/
htmx.org/extensions/web-sockets/
www.datafaker.net/documentati...
1 июл 2024