When we use idea to import packages related to servlets, we sometimes encounter errors, which leads to the problem that servlets cannot recognize. In fact, the reason for the problem is very simple, that is, we can’t find packages related to servlets in JDK
Solution:
1. Find the installation directory of Tomcat, here is C:\Program Files\Apache Software Foundation\Tomcat 8.5\lib (Note: not everyone’s directory is this, need to be based on the actual situation of your computer’s installation directory), find the Servlet-api.jar This file, copy it
2. then go to the JDK installation directory: C:\Program Files\Java\jdk1.8.0_241\jre\lib\ext, find the ext folder, and then copy the Servlet-api.jar file just copied to this folder
3. Back to the idea, the problem is solved, if the idea is still reporting errors, restart the idea refresh
Read More:
- [Solved] IDEA2020 Error: Cannot resolve symbol ‘Servlet‘
- [Solved] javax.servlet.ServletException: Servlet[springmvc] Servlet.init()
- [Solved] JAVA Project Import jstl Error: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
- How to Solve Hbase JAVA import Package Error
- IDEA Package Error: No valid Maven installation found.
- [Solved] IDEA Add maven Project Error: Error:(3,21)java: Package javax.servletdoes not exist
- [Solved] debug error: cloud netflix. eureka. EurekaDiscoveryClientConfiguration (IDEA package normally)
- How to Solve Assert error (IDEA Package Imported)
- [Solved] IDEA Error(15, 16) java Program Pack sun.misc does not exsit or import sun.misc.BASE64Decoder Cannot find
- [Solved] IDEA Import springboot Project Error: Cannot resolve plugin org.springframework.boot:spring-boot-maven-plugin:<unknown>
- Continuous Error 404 in servlet operation [How to Solve]
- [Solved] MultipartException: Failed to parse multipart servlet request; nested exception is java.lang.Runtime
- [Solved] Tomcat runs JavaWeb servlet Error 404
- [Solved] Error creating bean with name ‘org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0‘:
- IDEA was Filed to Start: error launching idea (Failed to create JVM )
- Maven project running servlet jump JSP error: HTTP status 500 – unable to compile class for JSP
- IDEA Maven Fail to Download Dependencies Error: ERROR – #org.jetbrains.idea.maven – Cannot reconnect.
- Idea create Maven project Error: [error] no longer supports source option 1.5. Please use version 1.6 or higher, and the idea reports an error: error: Java does not support the error of release version 5
- [Solved] Failed to bind properties under ‘spring.servlet.multipart.file-size-threshold‘ to
- How to Solve Tomcat Error: Could not resolve view with name ‘xxx/xxxxxxx‘ in servlet with