【发布时间】:2016-03-14 15:15:09
【问题描述】:
有没有办法在jetty的Dockerfile中设置默认的webapp?
文档说,您可以将 webapp.war 重命名为 root.war,但如果不想这样做,有没有办法将 webapp 指定为默认(且唯一)webapp。 我必须修改 Dockerfile 还是可以在 webapp (context.xml) 中指定
谢谢,拉杰什
【问题讨论】:
有没有办法在jetty的Dockerfile中设置默认的webapp?
文档说,您可以将 webapp.war 重命名为 root.war,但如果不想这样做,有没有办法将 webapp 指定为默认(且唯一)webapp。 我必须修改 Dockerfile 还是可以在 webapp (context.xml) 中指定
谢谢,拉杰什
【问题讨论】:
我猜你想通过使用 <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>
【讨论】:
我觉得你可以在project/WEB-INF下创建一个jetty config文件,你也可以看到http://www.eclipse.org/jetty/documentation/current/configuring-specific-webapp-deployment.html#deployable-descriptor-file
【讨论】: