What do you mean by "the only difference is where I load the resource" ?

Also, could it be some clients passing the proper Content-type/Accept
headers, where others are not ?


On Thu, Jan 30, 2014 at 10:31 AM, Pruitt, Byron S <[email protected]>wrote:

>  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
>
>
>
> @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
>



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to