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

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

如:

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

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

The servlets both mapped to the url-pattern 错误

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

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

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

猜你喜欢

转载自blog.csdn.net/sivanl/article/details/80242287