Closed glassfishrobot closed 7 years ago
Reported by macemers
oleksiys said: I've commited the fix. Could you pls. try 2.3.25-SNAPSHOT?
Was assigned to oleksiys
This issue was imported from java.net JIRA GRIZZLY-1823
Marked as fixed on Friday, January 6th 2017, 10:23:28 am
This bug seems to be back in 2.4.1 (and possibly earlier). I have my swagger static content configured under /api-docs. When I use http://localhost/api-docs, I get "Resource identified by path '/api-docs', does not exist." with grizzly error banner around it ("Grizzly 2.4.1" in bottom of banner). When I use '/api-docs/', then it renders the content as it should.
Please note, I'm using embedded grizzly server 2.4.1 with jersey. Server has a CLStaticHttpHandler configured on "/api-docs", and jersey configured at the root.
When using Grizzly to host static content like swagger-ui: httpServer = GrizzlyWebContainerFactory.create(uri); httpServer.getServerConfiguration().addHttpHandler(new StaticHttpHandler("swagger-ui"), "/swagger");
http://localhost/swagger/ works fine but http://localhost/swagger doesn't, which results in 404 not found error in the back end. It seems it tries to load from http://localhost:18888/css/typography.css but not from http://localhost:18888/swagger/css/typography.css.
Details are posted here: http://stackoverflow.com/questions/35123194/jersey-2-render-swagger-static-content-correctly-without-trailing-slash