Skip to content

Jetty logs a warning about an empty context path when using WebFlux #17399

@eungjun-yi

Description

@eungjun-yi

Jetty warns "Empty contextPath" while my server application, which depends on spring-boot-starter-webflux 2.1.6 and spring-boot-starter-jetty 2.1.6, is starting.

2019-07-02 19:00:40,472 WARN  main (ContextHandler) [-:-] Empty contextPath

It seems that JettyReactiveWebServerFactory sets the context path always to "".

ServletContextHandler contextHandler = new ServletContextHandler(server, "", false, false);

So it makes Jetty logs the warning message.

        if (contextPath.length() == 0)
        {
            LOG.warn("Empty contextPath");
            contextPath = "/";
        }

-- https://github.com/eclipse/jetty.project/blob/cf4e7412d440c581bc351de69fee1d00eac1a33e/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java#L1536-L1540

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions