servlet中urlpatterns注意事项

在servlet中,

@WebServlet(urlPatterns="/newsAdd")接收

resp.sendRedirect("/wedding/houtai/News/index.jsp");转发

上边的urlpatterns不能写成后缀名为jsp的格式,

在servlet中,有接收的页面和发送的页面

接收的页面链接写成伪路径即可

原文地址:https://www.cnblogs.com/1446358788-qq/p/4730477.html