1. 程式人生 > >匯入已有的Java Web專案時出現關於javax.servlet的異常時解決措施

匯入已有的Java Web專案時出現關於javax.servlet的異常時解決措施

1、Description Resource Path Location Type The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
2、Description Resource Path Location Type The project was not built since its build path is incomplete. Cannot find the class file for javax.servlet.jsp.PageContext. Fix the build path then try building this project
3、Description Resource Path Location TypeThe type javax.servlet.jsp.PageContext cannot be resolved. It is indirectly referenced from required .class files SaveLogoServlet.java



解覺方法:右擊專案——>屬性(Properties)——>找到Build Java Path——>右邊有libraries選項,點選——>Add Libraries——>Server Runtime——>next,再選中你的tomcat伺服器——>finish,回到Java Build Path右邊介面中的Orader and Export——>選中剛剛新增的ok就可以了