【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

问题呈现:New—》Maven Project—》Next—》选webapp

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

填写信息后,Finish,项目会是这样的:

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

    原因分析:没有发现父类javax.servlet.http.HttpServlet的java构建路径

    右击项目:Build Path--->Configure Build Path--->Add Library--->Server runtime--->Next

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

最后点OK保存后,项目回复正常,如图:

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

    问题呈现:New—》Maven Project—》Next—》选webapp

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

填写信息后,Finish,项目会是这样的:

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

    原因分析:没有发现父类javax.servlet.http.HttpServlet的java构建路径

    右击项目:Build Path--->Configure Build Path--->Add Library--->Server runtime--->Next

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……

最后点OK保存后,项目回复正常,如图:

【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……