2

我有一个战争文件,我必须在 glassfish 上以 root 身份部署。成功部署使用“/”作为上下文根的应用程序。但是当我尝试通过http://localhost/运行该应用程序时,它会抛出一个 503 表示请求的 service() 当前不可用。日志文件 server.log 有错误提示“javax.servlet.ServletException:站点树不在根 Web 应用程序的 servlet 上下文中”。我没有这个应用程序的源代码。这是我可以尝试解决的配置问题吗?

4

2 回答 2

1

部署到“/”对于将 webapp 放置在根上下文中是正确的。另一种部署到根目录的方法是将您的 webapp 设置为“virtual-server”条目中的“default-web-module”。503 错误是您的 servlet 有问题。假设 glassfish v2,您需要在 glassfish domain.xml 中提高日志记录级别。查找标签“module-log-levels”并将“root”、“server”和“web-container”元素设置为“ALL”。

于 2009-04-04T15:41:34.827 回答
0

I can't guarantee this, but try undeploying, then renaming the ROOT folder and then deploying again.

于 2008-09-17T08:59:18.687 回答