Posts

Replacing Tomcat: Configure Jetty with Spring Boot

 I this article we will learn how to configure Jetty with SpringBoot. I will not use Spring Initializr. Jetty is fast and lightweight, making it ideal for high-performance applications. Being modular, it allows enabling only the necessary components, optimizing resource usage. Jetty efficiently handles high traffic volumes, enabling applications to scale seamlessly. Add Dependencies to pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.egga</groupId> <artifactId>examplejetty</artifactId> <version>0.1</version> <packaging>jar</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.s...

Building a Simple Web Form with Jetty and Servlets

In this article, we will learn how to create a small web application using Java, Jetty, Thymeleaf, and Servlets. We will not use frameworks like Spring Boot because our goal is to understand how a web application works. Before beginning, we need the following requirements: Understanding how a web application works Fundamentals of programming Java 11 or higher Knowledge of how Maven works An IDE of your choice In my case, I will use NetBeans. In NetBeans, I will create a Maven Project → Java Application. We need to edit the pom.xml file because it contains the following dependencies: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelVersion>4.0.0</modelVersion>     <groupId>com.egga</groupId>     ...