購物車刪除跳轉出現問題?
我點擊刪除跳轉到http://localhost:8080/JspViewListDemo/servlet/servlet/CartServlet?action=delete&id=1
其實正確的網址是http://localhost:8080/JspViewListDemo/servlet/CartServletaction=delete&id=1
不知道為什么會多個/servlet導致頁面報錯404
我點擊刪除跳轉到http://localhost:8080/JspViewListDemo/servlet/servlet/CartServlet?action=delete&id=1
其實正確的網址是http://localhost:8080/JspViewListDemo/servlet/CartServletaction=delete&id=1
不知道為什么會多個/servlet導致頁面報錯404
2017-04-05
舉報
2017-04-06
應該是你轉發或者重定向的代碼中URL地址寫錯了,或者你配置servlet mapping中的url-pattern配置有問題