I am working with RestEasy and when I type the url http://localhost:8080/resteasy/xml I want to see a “Save As…” option in firefox.
@GET
@Path("/xml")
@Produces("application/octet-stream")
public List<FileDetail> getXmlContent() {
return findXml();
}
But when I use this, I get the error:
Unable to find JAXBContext for media type: application/octet-stream
What is wrong?
Thanks for your help.
If your want the ‘Save as’ dialog to appear in the browser, you can add the
Content-Disposition-header in the response