Author Archives: Stanislav_Panteleev

Java.Multithreading.What about synchronization and multithreading issues in servlet container ? Do we have smth right out of the box ?

🧵 Servlets Are Multithreaded by Default When multiple clients send requests to the same servlet, the servlet container creates a new thread for each request, but only one instance of the servlet is created and shared across threads. ⚠️ This … Continue reading →

Posted in Без рубрики | Comments Off on Java.Multithreading.What about synchronization and multithreading issues in servlet container ? Do we have smth right out of the box ?

Java.Servlet.How does a servlet container manage the servlet life cycle, when and what methods are called?

🔥 Let’s explore how a servlet container manages the servlet lifecycle step by step — including when and what methods are called. 🌀 Servlet Life Cycle Overview The servlet container (like Tomcat or Jetty) controls the life of a servlet. … Continue reading →

Posted in Без рубрики | Comments Off on Java.Servlet.How does a servlet container manage the servlet life cycle, when and what methods are called?

Java.Servlet.Why do we need application servers if we have servlet containers?

Yes — servlet containers like Tomcat can run web applications… so why do we need application servers like WildFly, GlassFish, or Payara? Let’s break it down:

Posted in Без рубрики | Comments Off on Java.Servlet.Why do we need application servers if we have servlet containers?

Java.Servlet.What is a “servlet container”?

A servlet container (also known as a servlet engine) is a part of a web server or application server that manages and executes Java servlets. 🔧 In simple terms: A servlet container is the runtime environment for servlets — it: … Continue reading →

Posted in Без рубрики | Comments Off on Java.Servlet.What is a “servlet container”?

Java.Servlets.What is the structure of a web project?

The structure of a web project depends on the tech stack you’re using (Java/Spring, Node.js, React, etc.), but in general, most web projects follow a modular structure with separation of concerns. Here’s a common structure for a full-stack Java-based web … Continue reading →

Posted in Без рубрики | Comments Off on Java.Servlets.What is the structure of a web project?

Java.Servlet.What are the advantages of servlet technology over CGI (Common Gateway Interface)?

⚙️ 1. Better Performance CGI: A new process is created for each request, which is expensive in terms of system resources. Servlets: Run in a single JVM, and each request is handled by a thread, not a new process. This … Continue reading →

Posted in Без рубрики | Comments Off on Java.Servlet.What are the advantages of servlet technology over CGI (Common Gateway Interface)?

Java.Servlet.What is a “servlet”?

A servlet is a Java program that runs on a Java-enabled web server (like Apache Tomcat) and handles HTTP requests and responses. Servlets are part of the Java EE (Jakarta EE) platform and are used to create dynamic web content, … Continue reading →

Posted in Без рубрики | Comments Off on Java.Servlet.What is a “servlet”?

Java.Reactive.Why do we need all that reactive programming ?

Because the traditional, blocking, imperative approach starts to fall apart when we build modern, scalable, high-performance, real-time systems. Let’s unpack that:

Posted in Без рубрики | Comments Off on Java.Reactive.Why do we need all that reactive programming ?

Java.Reative.What are the operators in Project Reactor and what are they used for?

🎯 In Project Reactor, operators are the core tools you use to transform, filter, merge, delay, or otherwise manipulate data as it flows through a reactive pipeline. Think of operators as the “verbs” in your reactive code — each one … Continue reading →

Posted in Без рубрики | Comments Off on Java.Reative.What are the operators in Project Reactor and what are they used for?

Java.Reactive.How to unsubscribe from a stream to prevent memory leaks?

Let’s look at how to unsubscribe from a stream in different reactive libraries to avoid memory leaks or resource hogging. 🧼 Why Unsubscribe? Streams may emit: Forever (e.g., mouse clicks, websocket events) Or slow, bursty data (e.g., Kafka, sensors) If … Continue reading →

Posted in Без рубрики | Comments Off on Java.Reactive.How to unsubscribe from a stream to prevent memory leaks?