title: Return a list of objects when using JAX-RS
body: <p>How can I return a list of Question objects in XML or JSON?</p>
  
  <pre><code>@Path("all")
  @GET
  public List&lt;Question&gt; getAllQuestions() {
      return questionDAO.getAllQuestions();
  }
  </code></pre>
  
  <p>I get this exception:</p>
  
  <blockquote>
    <p>SEVERE: Mapped exception to response: 500 (Internal Server Error)
    javax.ws.rs.WebApplicationException:
    com.sun.jersey.api.MessageException: A message body writer for Java
    class java.util.Vector, and Java type
    java.util.List, and MIME media
    type application/octet-stream was not found</p>
  </blockquote>