mattnelson / dropwizard-sandbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JettyContextPath

Minimal example of multiple context paths with jetty/dropwizard

There a few approaches implemented.

  • contextPath
  • servletMapping
  • contextHandler
  • handlerWrapper
  • redirect

Each modes can be enabled in the config.yml or supplied via a command line arg -Ddw.redirect=true

  1. Run mvn clean package to build your application
  2. Start application with java -jar target/jetty-context-path-1.0-SNAPSHOT.jar server config.yml
  3. Check that http://localhost:8080/alias/link return the same URL
  4. Check that http://localhost:8080/link return the same URL

About

License:Apache License 2.0


Languages

Language:Java 100.0%