Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Jakarta EE 8 Recipes
Rating: 3.8 out of 5(6 ratings)
58 students

Jakarta EE 8 Recipes

Create effective and reliable enterprise solutions with Jakarta EE 8 specifications
Last updated 11/2019
English
English

What you'll learn

  • Understand all the major components of the Jakarta EE platform
  • Build complete client-server applications using the Jakarta EE 8 specification
  • Translate features created using Java EE 8 to Jakarta EE
  • Implement request-response transactions using Servlet 4.x containers
  • Build and implement Jakarta EE components with Context Dependency Injection (CDI) 2.0
  • Apply authentication and authorization to applications using the Jakarta EE security model
  • Build and deploy Jakarta EE microservices locally or through cloud-based servers

Course content

9 sections • 61 lectures • 5h 59m total length
  • The Course Overview4:05

    This video will give you an overview about the course.

  • Setting Up HTTP/26:26

    Problem: How to run Jakarta EE framework in an HTTP/2 environment, using open source Apache TomEE Plume 8.x and Java 10? Solution: Install secured HTTP protocol to enable TLS and utilize ALPN module of Java 10.

       •  Use keytool command to generate JKS Keystore

       •  Extract our single certificate (.cer) for the JKS Keystore

       •  Apply Keystore to configure port 8443 and upgrade protocol to HTTP/2

  • The Server Push8:16

    Problem: How to apply performance tuning to browser performance of Jakarta EE application? Solution: Utilize HTTP/2 protocol to implement and use binary-based, multiplexed request-response transactions, and header-compressed server push.

       •  Use JavaScript or Bootstrap framework for our web static resources

       •  Create a Servlet with doGet() transaction to highlight PushBuilder interface which implements resources

       •  Open web console and observe that all web resources are cached by H2

  • Managing Request and Response6:49

    Problem: How to create Servlets and integrate components to them, using CDI 2.0 specification? Solution: Implement Servlet classes using HttpServlet and JSP views using JSTL.

    • Create an HttpServlet class and inject HttpSession and ServletContext using @Inject

    • Create CDI-based bean objects and access it using @Named and @Inject annotations

    • Directly access all CDI beans through their bean @Named inside a JSP using EL

  • Applying CDI 2.09:59

    Problem: How Jakarta EE integrates, utilizes, and manages its components using IoC design pattern? Solution: Apply CDI 2.0 specification to auto-wire or inject objects to other components instead of instantiating them to avoid tightly-coupled scheme.

    • Create a CDI 2.0 bean descriptor file inside /META-INF folder of the CLASSPATH’s resources directory

    • Create different classes decorated by the @Named, @RequestScoped, @SessionScoped, @ApplicationScoped, and @Dependent, and use them in Servlets using injection

    • Create method resources using @Named and @Resources annotations, and implement polymorphic implementations of injectable beans using @Default, @Alternative, and @Priority

  • Creating Filter Components5:38

    Problem: How to manage incoming requests and outgoing responses in Jakarta EE application? Solution: Implement three types of filters depending on the requirements or circumstances.

    • Implement a filter using filter abstract class and optionally override init() method to initialize FilterConfig

    • Implement a filter class using GenericFilter and invoke some of its default methods like getFilterConfig()

    • Implement a filter using HttpFilter to apply an authentication with error page redirection using HttpServletResponse

  • Creating Listeners3:34

    Problem: How to implement callbacks to Servlet container events? Solution: Implement Jakarta EE listeners.

    • Monitor request attributes, implement ServletRequestAttributeListener interface, track down the request and response transactions and objects, and use ServletRequestListener

    • Manage session objects and transactions, and implement HttpSessionListener

    • Create application-scoped objects and context-accessible methods, and implement ServletContextListener

  • Adding Servlets at Runtime2:02

    Problem: How to create servlets at runtime without using ServletRegistration? Solution: Using the addJspFile() method of ServletContext.

    • Create a JSP page inside the webapp directory

    • Implement a ServletContextListener and invoke the addJspFile() method, inside its contextInitialized() through the ServletContextEvent parameter

    • Create a Servlet implementation that will invoke the new Servlet using ServletContext’s getNamedDispatcher()

  • Managing Views Using Runtime Discovery5:08

    Problem: How to implement different Servlet responses using different URL patterns? Solution: Apply runtime discovery with HttpServletMapping.

    • Create a Servlet class with different URL patterns of different formats (that is “/”, “/exact”, “/path/*”, and “*.jsp”)

    • Create HttpServletMapping and extract all the essential MappingMatch information, including the Servlet pattern invoked

    • Avoid using include() request dispatch or ServletContext’s getNamedispatcher(), because runtime discovery does not work with them

  • Test Your Knowledge

Requirements

  • Who want to become proficient with Jakarta EE 8 and explore its core features.

Description

Do you wish to deliver really awesome enterprise solutions with the most robust and mature technology for enterprise development? This course will help you build effective enterprise solutions and become productive with Jakarta EE 8.

In this course, you will start by writing request-response transactions using Jakarta EE 8's sole container, Servlet 4.0. You will implement features in Jakarta EE by writing EJB 3.2 and JSF 2.3 web applications; build MVC applications using Eclipse Ozar; implement server-side components using CDI 2.0; and build REST services. You will also learn to improve the security of your enterprise solutions using built-in authentication and hard-coded authorization. And finally, you will learn to deploy your Jakarta EE applications and microservices on various reliable and secure servers.

By the end of the course, you will be using Jakarta EE 8 to develop a secure, effective, and reliable enterprise application.

About the Author

Sherwin John Calleja Tragura is a technical corporate trainer and a subject-matter expert on Java, JEE, and Spring application development. He is a certified EMC Documentum and OCP Java 7 Associate. He authored the following Packt books: Spring MVC Blueprints and Spring 5 Cookbook. Before that, he was a technical editor for Alfresco Share, Alfresco 3 Records Management, Mastering Hibernate, and Delphi Cookbook.

Who this course is for:

  • The video course is intended for experienced Java developers and JEE developers.