• 0

Dropwizard 0.8 and Jetty fail return 404 on resources

Simple hello world dropwizard application throws the error below- HTTP ERROR 404 Problem accessing /hello-world. Reason: Not Found While app logs says - return 200 for that request. Reason: If you look closely in terminal, it says

"MutableServletContextHandler@4b2a30d{/application,null,AVAILABLE}"
so try /application/hello-world, It will work. Why is it so: Answer is in your configuration.yaml file. If you just define the http port server: type: simple connector: type: http port: 8080 Then dropwizard creates 2 end points for you application port : /application/hello-world admin port : /admin/hello-world So if you define the separate admin port then you do not have to add /application in your end point url. server: type: simple connector: type: http port: 8080 type: admin port: 8081