When using embedded Tomcat, the error message:
HTTP/1.1 400 No Host matches server name 127.0.0.1
can be caused by neglecting to start a context path with a slash. That is, don't use this:
Context context = embedded.createContext("mycontext", webAppBase);
use this:
Context context = embedded.createContext("/mycontext", webAppBase);