users@grizzly.java.net

Re: Jersey and static http handler

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Wed, 14 Jan 2015 15:53:46 -0800

Hi,

pls. share your code (project on github?).

Thanks.

WBR,
Alexey.

On 14.01.15 13:34, Dezider Mesko wrote:
> Hi,
> I'm trying to setup Grizzly so StaticHttpHandler is serving content
> from local folder "./client" as server root like this:
>
> server.getServerConfiguration().addHttpHandler(new
> StaticHttpHandler("./client"), "")
>
> I have Jersey REST functions registered as well.
>
> @Path("rest")
> class RestFunctions {
> ...
> @GET @Path("staticData")
> @Produces("application/json")
> def getStaticData(){
> ...
>
>
> Unfortunately function staticData is not invoked. Logs reports that
> path ./client/rest/staticData doesn't exist.
>
> In other words, is possible to server static data and have rest
> functions on subpath?
>
> Thank you, Dezo