From the course: Jakarta Web Services
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Challenge: Travel app - Jakarta EE Tutorial
From the course: Jakarta Web Services
Challenge: Travel app
(bright music) - [Instructor] It is time for a challenge. In this challenge, I want you to implement a new resource method in our travel resource class. Here are the instructions. Travelers want to find out details of flights that fall within a given price range for a specific destination. I've already coded a method for you in the service class that queries this data from the database. You should get the code from the exercise files provided for you. There, you can find this method, findFlightsForPriceRange in the travel service class. Your task is to use the findFlightsForPriceRange method and build the REST endpoint that would give this data to the client. Attempt this challenge in two steps. In step one, implement a resource method that takes the destination as a query parameter, the min and max prices as two path parameters. Here's a small hint. You can pass multiple path parameters to a resource method as…
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
-
-
-
-
-
-
Implement resource method for reading: HTTP GET7m 52s
-
(Locked)
Use path parameters4m 28s
-
(Locked)
Use query parameters3m 54s
-
(Locked)
Explore response value types: Media types3m 40s
-
(Locked)
Media types in action5m 10s
-
(Locked)
ResponseBuilder and methods3m 4s
-
(Locked)
Control the response via ResponseBuilder7m 6s
-
(Locked)
Challenge: Travel app2m 23s
-
(Locked)
Solution: Travel app4m 54s
-
-
-
-
-