導項目問題解決記錄The type javax.servlet.http.HttpServletRequest cannot be resolved.

錯誤內容:
The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from 
 required .class files

錯誤原因:

缺少serverlet的引用庫,解決如下
1.工程右鍵-properties->java build path
2.在java build path的libraries tab頁中選擇Add external Jars...按鈕
3. 選擇eclipse的安裝目錄,我的是綠色版本,我本機的路徑如下,你自己需要根據自己的路徑查找添加。E:\eclipse-java-indigo-SR1-win32\eclipse\plugins 選擇javax.servlet.jsp_2.0.0.v201101211617.jar;javax.servlet_2.5.0.v201103041518.jar 進行添加即可
註釋:由於版本不同,文件包名可能稍有區別。


本文爲轉載文章,本文地址:https://blog.csdn.net/smartzhaomin/article/details/19487907

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章