String varTextA = "Hello World!";
String varTextB = "It's JSP.";
request.setAttribute("textA", varTextA);
request.setAttribute("textB", varTextB);
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/index.jsp");
dispatcher.forward(request, response);
但Tomcat 9告诉我这一点:
HTTP Status 404 - /index.jsp
type Status report
message /index.jsp
description The requested resource is not available.
我的项目树:
├── FirstJavaEEProject.iml
├── out
│ ├── artifacts
│ │ └── simple_mod_war_exploded
│ │ ├── index.jsp
│ │ └── WEB-INF
│ │ ├── classes
│ │ │ └── servlets
│ │ │ └── SimpleServlet.class
│ │ └── web.xml
│ └── production
│ └── simple-mod</