有没有办法在jetty的Dockerfile中设置默认的webapp?
文档说,您可以将webapp.war重命名为root.war,但如果不想这样做,是否有办法在默认(且仅限)webapp时指定webapp。 我是否必须修改Dockerfile或者我可以在webapp(context.xml)中指定
谢谢Rajesh
答案 0 :(得分:1)
我猜你想通过使用<hostname:port>
来访问webapp.war而没有使用网络应用程序名称。
您可以使用root / index.html重定向到您的Web应用程序来进行重定向。
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>
答案 1 :(得分:0)
我认为你可以在project / WEB-INF下创建一个jetty配置文件,你也可以看到它http://www.eclipse.org/jetty/documentation/current/configuring-specific-webapp-deployment.html#deployable-descriptor-file