segunda-feira, 10 de Julho de 2017 às 17:33:28 UTC-3, Douglas Patriarche 
escreveu:
>
> Hmm, I made an error in my earlier message. I was confusing the 
> "applicationContextPath" and the "rootPath". Everything I said refers to 
> the applicationContextPath, not the rootPath. So to fix that up:
>
> You're going to need to put your assets under some URI path, like "assets":
>
>     bootstrap.addBundle(new AssetsBundle("/assets/", "/assets/", 
> "index.htm", "static"));
>
> Then your static assets will be served there:
>
>     http://example.com/<applicationContextPath>/index.html
>     http://example.com/<applicationContextPath>/assets/js/jquery.js
>     http://example.com/<applicationContextPath>/assets/img/logo.png
>
> As for the option of swapping the static assets to "/" and moving the 
> Jersey servlet to the rootPath, as discussed at the DW docs link you 
> provided, it sounds like it should do what you want, but I have never tried 
> it. If it's not working for you then it's possible there is a regression in 
> DW, since it sounds like the sort of feature that might not be used very 
> widely.
>
> Regards,
> Doug
>

Hi Douglas,

Do you think would worth to create an issue on github explaining this to 
see their answer?

Also, from the manual it seems the preferable way of organizing a project 
is having separated projects for api, client and application as per here: 
http://www.dropwizard.io/1.1.2/docs/manual/core.html#organizing-your-project

As a novice I wonder if that means actually 3 projects, being: 1- a REST 
server, 2- the front-end, 3- both together. 

If that is what it means, I don't see how to do it, but maybe this out of 
scope of this thread.

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to