My WS-RS client successfully loads a requested resource.
I have verified that contentBytes has the correct resource.
But I still get this error message
2014-01-30 13:16:33,382 INFO org.apache.wink.server.internal.RequestProcessor -
The following error occurred during the
invocation of the handlers chain: WebApplicationException (404 - Not Found)
with message 'null' while processing GET request sent to
http://localhost:8080/myApp/resource/editor/css/bootstrap.css -
108657<http://localhost:8080/myApp/resource/editor/css/bootstrap.css%20-%20108657>
@Path(Controller.EDITOR_CSS_RESOURCE)
@Produces("text/css")
public Response getEditorCSSResource(@Context UriInfo ui)
{
InputStream inStream;
byte[] contentBytes = null;
try {
inStream =
this.getClass().getClassLoader().getResourceAsStream("/resource/" +
ui.getPath());
contentBytes = IOUtils.toByteArray(inStream);
inStream.close();
}
catch(IOException e) {
e.printStackTrace();
}
return Response.ok(contentBytes, "text/css").build();
}
I have used this same above method in a different WS-RS client and it works
fine. The only difference is where I load the resource, but content bytes is
the same.
Thanks.
-Steve