From the course: Java EE 8: Web Services
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Handle request parameters in JAX-RS - Java EE Tutorial
From the course: Java EE 8: Web Services
Handle request parameters in JAX-RS
- [Instructor] The JAX-RS specification really went all out in providing options for accepting input in parameters and service requests. Let's look at some of the more common options for accepting input in a JAX-RS Web service. Now, heads up: the GlassFish application server ships with everything that a Jersey application will ever need to function, including the dependencies needed to process a wide variety of request types. So, handling JSON and XML, for example, doesn't need a lot of extra work on your part. For Tomcat, however, we need to supply dependencies to handle different data types. But, fear not, one Maven dependency will pull in all the dependencies necessary to handle JSON requests. If you're running Tomcat, make sure you have the JSON-B dependency present and uncommented in your pom.xml. So, when we go down here on line 82, we see here, group ID, "org.glassfish.jersey.media", the artifact ID is…
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.