运行整个项目的时候点击生成报表就弹出以下错误,怎么解决?视频里面showReport创建的那一部分被剪掉了
HTTP Status 404 - /TestReport/ShowReport
type Status report
message /TestReport/ShowReport
description The requested resource is not available.
补充ShowReport代码
package servlet;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import service.Service;
public class ShowReport extends HttpServlet {
public ShowReport(){
super();
}
public void init() throws ServletException{
}
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException{
this.doPost(request, response);
}
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException{
List list;
Service service = new Service();
list = service.getProfit();
request.getSession().setAttribute("New", list);
response.sendRedirect("NewFile.jsp");
}
}