【发布时间】:2016-02-21 22:37:41
【问题描述】:
我正在尝试将应用程序部署到 Openshift 服务器,但那里出现一个奇怪的错误,它不想部署我的 war 文件。错误状态:
Caused by: java.lang.IllegalArgumentException: The servlets named [AdminUIServlet] and [GalleryUIServlet] are both mapped to the url-pattern [/admin/*] which is not permitted
问题是我的映射不同,当我在本地运行项目时,这是可行的。以下是代码中的 mymappings:
@WebServlet(urlPatterns = "/*", name = "GalleryUIServlet", asyncSupported = true)
@WebServlet(urlPatterns = "/admin/*", name = "AdminUIServlet", asyncSupported = true)
这个错误怎么可能?我该如何解决这个问题?
【问题讨论】: