【Maven】新建Maven项目后index.jsp报错:The superclass javax.servlet.http.HttpServletwas not found……
问题呈现:New—》Maven Project—》Next—》选webapp
填写信息后,Finish,项目会是这样的:
原因分析:没有发现父类javax.servlet.http.HttpServlet的java构建路径
右击项目:Build Path--->Configure Build Path--->Add Library--->Server runtime--->Next
最后点OK保存后,项目回复正常,如图:
问题呈现:New—》Maven Project—》Next—》选webapp
填写信息后,Finish,项目会是这样的:
原因分析:没有发现父类javax.servlet.http.HttpServlet的java构建路径
右击项目:Build Path--->Configure Build Path--->Add Library--->Server runtime--->Next
最后点OK保存后,项目回复正常,如图: