原因,代码中在public前已经有了默认的配置路径:

如:

@WebServlet("/ShowUser")
public class ShowUser extends HttpServlet 

如果在xml中继续配置则会出项

The servlets both mapped to the url-pattern 错误

一般理解把其一干掉即可。

如注销xml中的路径,问题解决:

The servlets named [create_subscription] and [servlet.create] are both mapped to the url-pattern

但是注释掉java中的默认路径配置或删除默认路径均无效:

The servlets named [create_subscription] and [servlet.create] are both mapped to the url-pattern

The servlets named [create_subscription] and [servlet.create] are both mapped to the url-pattern

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-10-10
  • 2022-12-23
  • 2021-07-16
  • 2021-11-01
  • 2021-08-14
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2021-09-24
  • 2021-07-05
  • 2021-06-19
相关资源
相似解决方案