Jakarta EE Servlets

Jakarta EE Servlets

2h 36mIntermediate2023-04-27

Authors

Kevin Bowersox

Kevin Bowersox

Full-Stack Java Developer, Instructor

Course details

In this course, Kevin Bowersox provides you with an understanding of Jakarta servlets and how they are used to build web-based systems with Java. Kevin covers important topics like: the concepts behind why servlets are used and how they relate to other web frameworks; the key interfaces within the Jakarta EE servlet specification; creating and configuring a project that uses servlet technologies; how to process web requests using servlets; and how to augment web request processing with filters. Plus, he shares common pitfalls to avoid when using servlets.

Skills covered

Jakarta EEBack-End Web DevelopmentWeb DevelopmentDeep Dive (X:Y)

Concepts

Introduction

  • Jakarta Servlets - Building amazing web-based systems with Java

Getting Started with Jakarta Servlets

  • Developing web-based systems with Servlets
  • Servlet containers
  • Standalone vs. embedded containers
  • Setting up your development environment
  • Running an embedded container
  • Installing a standalone Servlet container
  • H+ Sport project
  • Running Servlets in a standalone container

Handling Web Requests with Servlets

  • HTTP request messages
  • Mapping requests to a Servlet
  • Advanced Servlet mappings
  • Request handler methods
  • Obtaining data from query parameters
  • Obtaining data from the path
  • Obtaining data from headers
  • Obtaining form data from the request body
  • Obtaining JSON data from the request body
  • Challenge - Handling Servlet requests
  • Solution - Handling Servlet requests

Returning Responses from Servlets

  • HTTP response messages
  • Building a response body
  • Setting response status codes
  • Returning response headers
  • Challenge - Creating Servlet responses
  • Solution - Creating Servlet responses

Filtering, Error Handling, and Dispatching in Servlets

  • Advanced request-handling techniques
  • Filters
  • Forwarding requests
  • Redirecting a request
  • Handling errors in Servlets

Servlet Configuration and Deployment

  • Configuration with Servlet initialization parameters
  • Configuration with context parameters
  • Setting up the host environment
  • Creating a WAR file
  • Deploying Servlets to a standalone container

Conclusion

  • Next steps
80,000 Toman