1. 程式人生 > >IntelliJ IDEA寫JSP檔案出現“cannot resolve method”解決辦法

IntelliJ IDEA寫JSP檔案出現“cannot resolve method”解決辦法

最近在使用IDEA寫JSP檔案的時候,有些內建物件出現了cannot resolve method的警告提示,程式碼執行沒有問題,在編寫的時候也不會提示,最後請教了萬能的搜尋引擎,解決了此問題。
IntelliJ IDEA寫JSP檔案出現“cannot resolve method”解決辦法

解決辦法

該錯誤的導致的原因是因為沒有在專案中新增好伺服器關聯,解決辦法為:開啟File>Project Structure>Modules>Dependencies,然後點選右邊的綠色+號,選擇Library,然後選擇你的Tomcat伺服器新增,然後再Apply應用即可。

轉:https://www.licoy.cn/2459.html