From the course: Jakarta EE Servlets
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Challenge: Handling Servlet requests - Jakarta EE Tutorial
From the course: Jakarta EE Servlets
Challenge: Handling Servlet requests
(upbeat music) - [Instructor] Now it's your turn to tackle a programming challenge that'll require you to work with the HTTP servlet request in the product servlet. In this challenge, H+ Sport is adding the ability to update an existing product that is found within the product catalog. They'll need your help to implement this capability in the product servlet. To complete the challenge, you'll need to add a new method to the product servlet that receives the updated product information from the client, and then performs the update on the associated product in the catalog. H+ Sport would like you to implement this logic in a way that allows the client to provide the data for the product update in either JSON or XML format with JSON being the default. To help with parsing the data the client provides, you'll find static utility methods on the Product class named from XML and from JSON that you can use to deserialize…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
HTTP request messages5m 14s
-
(Locked)
Mapping requests to a Servlet4m 38s
-
(Locked)
Advanced Servlet mappings6m 4s
-
(Locked)
Request handler methods5m 19s
-
(Locked)
Obtaining data from query parameters8m
-
(Locked)
Obtaining data from the path4m 33s
-
(Locked)
Obtaining data from headers5m 53s
-
(Locked)
Obtaining form data from the request body5m 15s
-
(Locked)
Obtaining JSON data from the request body5m 46s
-
(Locked)
Challenge: Handling Servlet requests1m 32s
-
(Locked)
Solution: Handling Servlet requests6m 5s
-
-
-
-
-