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

Tag Archives: JAX-RS

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 »

Apache CXF 3.0: JAX-RS 2.0 and Bean Validation 1.1 finally together

java-interview-questions-answers

The upcoming release 3.0 (currently in milestone 2 phase) of the great Apache CXF framework is bringing a lot of interesting and useful features, getting closer to deliver full-fledged JAX-RS 2.0 support. One of those features, a long-awaited by many of us, is the support of Bean Validation 1.1: easy and concise model to add validation capabilities to your REST ...

Read More »

JAX-RS 2.0 : Custom Content Handling

java-interview-questions-answers

I tried to think of a better title, but failed to come up with one ! Please bear with me……. The JAX-RS 2.0 specification allows us to seamlessly marshal/unmarshal JAXB objects to/from HTTP request/response bodies. Simply put, we can just work with the domain objects without being worried about the low level XML serialization within JAX-RS based solutions. Before we begin, ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close