解決javax.servlet.jsp.JspException cannot be resolved to a type
使用eclipse-juno新建的maven專案,使用過程中無任何問題,但是換了eclipse-luna版本後,匯入同樣的maven專案,則報javax.servlet.jsp.JspException cannot be resolved to a type錯誤;這可能是新版本eclipse的bug導致。
在網上找的解決方案是在你的專案中加入jsp-api.jar和servlet-api.jar包,這兩個包來源於tomcat的libs目錄中,但是會出現一個問題,專案打包釋出的時候也會將這兩個jar打包出去,這時候釋出到tomcat中後tomcat可能啟動失敗,同時你的jar包可能和tomcat中的jar版本不一致等情況。
解決方式:右鍵你的專案--properties選擇Targeted Runtimes,選擇你的執行環境,我選擇Apache Tomcat v7.0,Apply--OK。
相關文章
- xxx cannot be resolved to a type
- eclipse中:The type java.lang.object cannot be resolved錯誤(jdk配置錯誤)EclipseJavaObjectJDK
- 解決 TypeError: Type aliases cannot be used with isinstance(). 辦法Error
- 解決java.lang.IllegalArgumentException: 'Content-Type' cannot contain wildcard type '*'異常(真實有效)...JavaExceptionAI
- cannot convert (type interface {}) to type int: need type assertion
- Cannot set property ‘type‘ of null(vue)NullVue
- POST http://xxx net::ERR_NAME_NOT_RESOLVED 解決HTTP
- 解決cannot find module providing package或cannot find main modulePackageAI
- 關於Chrome報錯 ERR_NAME_NOT_RESOLVED 解決辦法Chrome
- PySimpleGUI 引入後VsCode出現問題提示 “could not be resolved” 解決方案GUIVSCode
- “ORA-28007: the password cannot be reused”解決
- 解決“su: cannot open session: Permission denied”Session
- Jquery DataTables解決 Cannot reinitialise DataTable 問題jQuery
- Ubuntu Cannot allocate memory 錯誤解決方案Ubuntu
- ImportError: cannot import name ‘imresize‘解決辦法ImportError
- 解決Cannot find module '@angular/compiler-cli'AngularCompile
- vue Cannot find module @/xxx/xxx.ts or its corresponding typeVue
- Access restriction: The type 'Resource' is not API 解決辦法RESTAPI
- TypeError: Descriptors cannot not be created directly問題的解決Error
- MYSQL中 TYPE=MyISAM 錯誤的解決方法MySql
- SpringBoot解決返回體content-type非jsonSpring BootJSON
- Android Studio 出現“Cannot resolve symbol” 解決辦法AndroidSymbol
- 解決 ImportError: cannot import name 'imread' from 'scipy.misc'ImportError
- 解決String cannot be cast to java.util.List報錯ASTJava
- JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from StringJSONErrorJavaLDA
- springboot專案解決 No beans of 'UserDao' type found 問題Spring BootBean
- libcudart.so.8.0: cannot open shared object file解決方案DartObject
- Android Studio 顯示Cannot resolve symbol 'XXX'的解決方式AndroidSymbol
- 關於Cannot resolve scoped service from root provider解決方案IDE
- com.alibaba.fastjson.JSONObject cannot be cast to XXX異常解決ASTJSONObject
- 關於React Native報Cannot access ‘serviceOf‘的解決方案React Native
- JDK 載入jar中的檔案資源出現Cannot be resolved to absolute file path because it does not reside in the file systemJDKJARIDE
- eclipse :報錯 ‘XXXX‘ does not name a type的解決辦法Eclipse
- ps1 is not digitally signed. You cannot run this script解決方案Git
- Dynamics CRM the field cannot be deleted because it is used in one or more process的解決方法delete
- 建立外來鍵時報 Cannot add foreign key constraint 解決方法AI
- ] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin Cannot instantiate object of typeAIGoMyBatisMavenPluginObject
- SpringBoot-java.lang.IllegalArgumentException: Not a managed type異常問題解決方法Spring BootJavaException