java.lang.Error: Unresolved compilation problems:
The type javax.servlet.http.HttpServletResponse cannot be resolved. It is indirectly referenced from required .class files
The type javax.servlet.ServletResponse cannot be resolved. It is indirectly referenced from required .class files
The type javax.servlet.ServletRequest cannot be resolved. It is indirectly referenced from required .class files
The import javax.servlet.http.Cookie cannot be resolved
The import javax.servlet.http.HttpServletRequest cannot be resolved
The import javax.servlet.http.HttpServletResponse cannot be resolved
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
The type javax.servlet.ServletException cannot be resolved. It is indirectly referenced from required .class files
The method buildWrapper() from the type ParameterWrapper refers to the missing type ServletException
Cookie cannot be resolved to a type
Cookie cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
問(wèn)題:項(xiàng)目能正常啟動(dòng),但在系統(tǒng)登錄時(shí)卻報(bào)錯(cuò)!MyEclipse 報(bào)錯(cuò)問(wèn)題。
原因:由于電腦上安裝了多個(gè)JDK版本,而MyEclipse IDE 使用默認(rèn)版本,使得 IDE 的Compiler Compliance level 與 Installed JREs 版本不對(duì)應(yīng)而導(dǎo)致錯(cuò)誤。
解決方案:將 IDE 的Compiler Compliance level 與 Installed JREs 版本修改為一致。(例如:Compiler Compliance level 使用1.5時(shí),Installed JREs版本則使用jdk1.5.0 )
圖解:Compiler Compliance level:
Installed JREs:
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。