項目jsp不能引入Servlet錯誤

        在項目中會出現一些jsp報錯,報錯信息是The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path,其緣由是沒有引入servlet-api.jar錯誤,由於這個jar包是在tomact服務器lib中,因此咱們在引入tomact服務器是會首先加載裏面的servlet-api.jar.所以咱們沒必要額外在項目中添加servlet-api.jar到lib中。可是如今沒法被引入,首先要查看下項目是否引入了tomact,應該是沒有引入。java

      方法:右擊項目->build path ->configure build path -> libraries->add library(server run time -> apache tomcat),-> order and export(將apache tomcat 放在首位)。apache

   The superclass "javax.servlet.jsp.tagext.SimpleTagSupport" was not found on the Java Build Path錯誤也是同樣,這個是沒有引入jsp-api.jar包,這個包也在tomact中,因此當tomact被引入是錯誤就會解決。api

相關文章
相關標籤/搜索