Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Java Web Internals
  • Table Of Contents Toc
Java Web Internals

Java Web Internals

By : Francisco Isidro Massetto
5 (1)
close
close
Java Web Internals

Java Web Internals

5 (1)
By: Francisco Isidro Massetto

Overview of this book

Ever wondered how web servers like Tomcat process requests, or what really happens behind frameworks such as Spring? This book takes you beneath the surface of Java web development to uncover the why behind the tools you use every day. Rather than focusing solely on coding recipes, this book emphasizes the underlying concepts and design principles that govern how web servers and frameworks operate. Starting with low-level socket programming, you’ll build a multithreaded HTTP server from the ground up and extend it into a lightweight application server capable of handling dynamic content. Along the way, you’ll master HTTP request parsing, response generation, servlet-like request handling, and Java reflection and annotations for metaprogramming. As you progress, you’ll evolve this infrastructure into your own Java framework with embedded Tomcat, annotation-driven routing, object serialization with Jackson, and basic dependency injection modeled on Jakarta CDI. By the end of this journey, you’ll understand the principles behind them, enabling you to reason about system design, troubleshoot complex issues, and apply these concepts across frameworks and programming languages. *Email sign-up and proof of purchase required
Table of Contents (15 chapters)
close
close
14
Index

1

Networks, Protocols, and Packets

The development of web applications has never been as popular as it is currently. Web systems, applications, and IoT devices are gaining more space in people's daily lives.

Therefore, the training of developers to master these technologies, languages, frameworks, and tools becomes essential – developers who are not only capable of delivering solutions to end users, but who also have in-depth knowledge of how this entire communication infrastructure works and enables this development.

For this reason, it is necessary to explore the entire infrastructure, communication models, architecture, and purpose of the services that are used to make this web environment increasingly available to end users.

Understanding how a web server works, the difference between a web server and an application server, the protocols involved, the handling of requests and responses, and the frameworks and their functioning is of paramount importance for your career. Current applications are developed as a set of pieces to be fitted together. For example, when you create a web application, lots of frameworks and libraries do the demanding work for you (database connection, some queries, request handling, response generation, etc.). But what about when things don't work? Is the error in your logic, in the misuse of the framework, or in the poor understanding of a communication protocol?

Finally, if you want to be an above-average developer, you will need to understand how technologies work behind the scenes. And that is exactly the purpose of this book: to show, step by step, how we can implement a "simple" web server, an application server, and a web framework, guaranteeing productivity, reliability, and speed in the development of your projects and applications.

Welcome to this journey, which will explore, demystify, and clarify the entire web infrastructure so you can become a developer well above the average.

In this chapter, we will cover the following main topics:

  • TCP/IP stack
  • The need for a protocol definition
  • Implementing a simple protocol using sockets

By the end of the chapter, you will understand how two applications running on different computers connected by a physical channel (a wired or wireless network) can exchange data. It's more complex than writing "Hello" to another user on a chat application. It requires several layers that control and handle different aspects to make this communication viable.

Your purchase includes a free PDF copy + code bundle

Your purchase includes a DRM-free PDF copy of this book, the code bundle, and additional exclusive extras. See the Free benefits with your book section in the Preface to unlock them instantly and maximize your learning.

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
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon