RE: Re: JSR 311 Get Image
Hi Thierry, Thanks much! I'll try that. Let me know when the fix is available... Best Regards, Boris -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2799064
Re: JSR 311 Get Image
hello Boris, your code should work, but I reproduce also the bug, I take care of it. I'm quite busy these days and Jérôme is half on vacations. :) best regards, Thierry Boileau Hi again guys, A simple what you're doing should work will be helpful to me as well. I can try debugging through the Reslet source code assuming the problem is not with my code. Thanks! Boris -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2796058 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2798954
Re: JSR 311 Get Image
Hello Boris, as a workaround, you can use the jetty connector : just add the org.restlet.ext.jetty.jar to the classpath and add also the libraries it depends on (javax.servlet and org.eclipse.jetty, you will find them in the restlet distribution). I notice that the problem is due to the internal HTTP server connector. Best regards, Thierry Boileau hello Boris, your code should work, but I reproduce also the bug, I take care of it. I'm quite busy these days and Jérôme is half on vacations. :) best regards, Thierry Boileau Hi again guys, A simple what you're doing should work will be helpful to me as well. I can try debugging through the Reslet source code assuming the problem is not with my code. Thanks! Boris -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2796058 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2798956
RE: JSR 311 Get Image
Hi again guys, A simple what you're doing should work will be helpful to me as well. I can try debugging through the Reslet source code assuming the problem is not with my code. Thanks! Boris -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2796058
JSR 311 Get Image
Hi, Could somebody point out what could be wrong with the following attempt to return an image from a REST response? I'm using 2.1m5 with JAXRS extension (JSR 311) and I have the following method: @GET @Path(/photo/{id}) @Produces(image/jpeg) public byte [] getPhoto() { byte [] image = // obtain image as a binary area from somewhere return image; } I'm trying to display the image in a browser (Chrome or Mozilla), but it fails to load it. It hangs for a while and then complains with: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. I've trying constructing a Response object with appropriate media type and various different entity types (a File, a GenericEntity and what not), but all with the same result. I'm sure the image data is correct. I tried tracing with the debugger the whole stack of Restlet framework filter this, filter that on the response, but I'm not familiar with the code...I can spend further type stepping with the debugger if pointed at the right direction. Thanks! Boris -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2793909