Description
If jetty-eeXX-maven-plugin loads Jetty XMLs like jetty-cross-origin.xml where a org.eclipse.jetty.server.handler.CrossOriginHandler handler is created and added to Server object, then later an underlying method removes this handler..
public static void configureHandlers(Server server, List<ContextHandler> contextHandlers, RequestLog requestLog) throws Exception
{
if (server == null)
throw new IllegalArgumentException("Server is null");
if (requestLog != null)
server.setRequestLog(requestLog);
if (server.getDefaultHandler() == null)
server.setDefaultHandler(new DefaultHandler());
ContextHandlerCollection contexts = findContextHandlerCollection(server);
if (contexts == null)
{
contexts = new ContextHandlerCollection();
server.setHandler(contexts);
}
if (contextHandlers != null)
{
for (ContextHandler context:contextHandlers)
{
contexts.addHandler(context);
}
}
}
Problem is in line with:
server.setHandler(contexts);
It should be probably addHandler(contexts) type of logic..
Jetty version(s) Jetty 12.0.13
Description If jetty-eeXX-maven-plugin loads Jetty XMLs like jetty-cross-origin.xml where a org.eclipse.jetty.server.handler.CrossOriginHandler handler is created and added to Server object, then later an underlying method removes this handler..
Problem is in line with:
server.setHandler(contexts);
It should be probably addHandler(contexts) type of logic..