Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Java Web Internals

You're reading from   Java Web Internals Unlock the secrets of Java web servers, frameworks, and application architecture

Arrow left icon
Product type Paperback
Published in Apr 2026
Publisher Packt
ISBN-13 9781835881484
Length 214 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Francisco Isidro Massetto Francisco Isidro Massetto
Author Profile Icon Francisco Isidro Massetto
Francisco Isidro Massetto
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Chapter 1: Networks, Protocols, and Packets FREE CHAPTER 2. Chapter 2: Workings of a Web Server – A Case Study 3. Chapter 3: Implementing a Simple Web Server 4. Chapter 4: Web Servers vs Application Servers 5. Chapter 5: Deep Dive into Simple Web Container Implementation 6. Chapter 6: Simple Web Container Improvements and Expansions 7. Chapter 7: Why Create a Web Framework 8. Chapter 8: Web Frameworks – The Necessary Abstraction for Professional Development 9. Chapter 9: Detailing the SimpleWebFramework Implementation 10. Chapter 10: The Emergence of Dependency Injection and Its Application in SimpleWebFramework 11. Chapter 11: Creating the First Application with SimpleWebFramework 12. Chapter 12: Unlock Your Exclusive Benefits 13. Other Books You May Enjoy 14. Index

Exploring classes on SimpleWebContainer

Now that we have a project ready to run inside SimpleWebContainer, that is, an external project whose classes can be "copied" or "installed" in the respective SWC folders, how can it manage all of this so that it knows exactly which classes to run from the respective URL paths?

Here we need to organize the solution architecture a little. To do so, we will illustrate it in the following image:

Image 1

Figure 5.1: Simple web container initial architecture

This architecture is very similar to the one defined in the previous chapter, but here we add a new component: the Servlet Discover Service. This service is responsible for searching the folder designated for dynamic content (in this case, represented by /webapps/WEB_FOLDER) for all classes that extend the SimpleServlet class when the SWC is started.

The strategy adopted for this discovery is simple and uses an on-demand operation.

Initially, a table (a Hash Map) is created where the...

lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Java Web Internals
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon