【问题标题】:How to set a default webapp in jetty Docker如何在码头 Docker 中设置默认 webapp
【发布时间】:2016-03-14 15:15:09
【问题描述】:

有没有办法在jetty的Dockerfile中设置默认的webapp?

文档说,您可以将 webapp.war 重命名为 root.war,但如果不想这样做,有没有办法将 webapp 指定为默认(且唯一)webapp。 我必须修改 Dockerfile 还是可以在 webapp (context.xml) 中指定

谢谢,拉杰什

【问题讨论】:

    标签: docker jetty


    【解决方案1】:

    我猜你想通过使用 <hostname:port> 访问 webapp.war 而没有 web 应用程序名称.. 您可以使用重定向到您的网络应用程序的 root/index.html 进行重定向。 index.html 的内容将是

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
       <META HTTP-EQUIV="Refresh" CONTENT="0; URL=/<your Web app name>/"/> 
    </head>
    <body>
    </body>
    

    【讨论】:

      【解决方案2】:

      我觉得你可以在project/WEB-INF下创建一个jetty config文件,你也可以看到http://www.eclipse.org/jetty/documentation/current/configuring-specific-webapp-deployment.html#deployable-descriptor-file

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-29
        • 2016-03-13
        • 2016-04-30
        • 2018-01-28
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多