Home » Tag Archives: JAX-RS (page 2)

Tag Archives: JAX-RS

Building a HATEOAS API with JAX-RS and Spring

Jersey-logo

In my previous blog post I showed how easy Jersey can be configured with Spring Boot. My exploration on Spring Boot and Jersey did not end and I investigated the possibility of using Spring HATEOAS along with Jersey in Spring Boot application. Spring HATEOS allows creating REST representations that follow the HATEOAS principle and (as of writing this article) has ...

Read More »

Beyond the JAX-RS spec: Apache CXF search extension

java-interview-questions-answers

In today’s post we are going to look beyond the JAX-RS 2.0 specification and explore the useful extensions which Apache CXF, one of the popular JAX-RS 2.0 implementations, is offering to the developers of REST services and APIs. In particular, we are going to talk about search extension using subset of the OData 2.0 query filters. In the nutshell, search ...

Read More »

How to compress responses in Java REST API with GZip and Jersey

Jersey-logo

There may be cases when your REST api provides responses that are very long, and we all know how important transfer speed and bandwidth still are on mobile devices/networks. I think this is the first performance optimization point one needs to address, when developing REST apis that support mobile apps. Guess what? Because responses are text, we can compress them. And with ...

Read More »

Java EE 7 / JAX-RS 2.0 – CORS on REST

java-interview-questions-answers

Java EE REST application usually works well out of the box on a development machine where all server side resources and client side UIs point to “localhost” or 127.0.0.1. But when it comes to cross domain deployment (when the REST client is no longer on the same domain as the server that host the REST APIs), some work-around is required. ...

Read More »

New in JAX-RS 2.0 – @BeanParam annotation

java-interview-questions-answers

JAX-RS is awesome to say the least and one of my favorites! Why? Feature rich Intuitive (hence the learning curve is not as steep) Easy-to-use and develop with Has great RIs – Jersey, RestEasy etc There are enough JAX-RS fans out there who can add to this! JAX-RS 2.0 is the latest version of the JSR 311 specification and it ...

Read More »

Jax-RS custom exception handling

java-interview-questions-answers

One of the nice things about working with JEE is the components available really are pretty standard.  While using JAX-RS, sometimes you need to control how exceptions get processed and fed back to the user.  If an exception is thrown, by default, you’ll get some horrible HTTP 500 internal server exception, exposing the internal failings of your web service. Consider ...

Read More »

Jersey/Jax RS: Streaming JSON

json-logo

About a year ago I wrote a blog post showing how to stream a HTTP response using Jersey/Jax RS and I recently wanted to do the same thing but this time using JSON. A common pattern is to take our Java object and get a JSON string representation of that but that isn’t the most efficient use of memory because ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.