1. 程式人生 > >[IDE - Eclipse] JSP報錯:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

[IDE - Eclipse] JSP報錯:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

引入 ips eclips size eclipse -i let details javax

是因為Eclipse的Web項目不自動引入相關jar包.

Right Click on the Project ? Properties ? Project Facets. You would be presented with the screen that would look similar to the following screen. On the right hand side, you would see two tabs: Details and Runtimes. Click Runtimes tab ? Check the Apache tomcat server ? Apply ? Ok
技術分享圖片

That’s it. This would solve the error.

Caution:tomcat/jdk的版本兼容問題.

技術分享圖片

[IDE - Eclipse] JSP報錯:The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path