1. 程式人生 > >The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly reference 問題之解決

The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly reference 問題之解決

問題原因:

專案中缺少jar包:servlet-api.jar

解決辦法:

方法1:把 servlet-api.jar 新增到專案中(該jar包在Tomcat目錄的lib資料夾下)

方法2:專案中新增Server Library(Apache Tomcat  ...)