您的位置:首页 > 移动开发

The servlets .. are both mapped to the url-pattern [/ControllerServlet] which is not permitted

2016-05-14 07:30 651 查看
Caused by: java.lang.IllegalArgumentException: The servlets named [ControllerServlet] and [com.classmgt.servlet.ControllerServlet] are both mapped to the url-pattern [/ControllerServlet] which is not permitted

运行j2ee程序,一直遇到这个错,发现是因为新版本的eclipse不会去自己生成web.xml,也不需要自己去配置xml文件。

eclipse已经有另外一种好的解决方案:利用
@WebServlet
annotation

所以你重复配置了这个。

解决方案是删除web.xml文件。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: