Idea uses out in JSP Print error
As follows:
report errors:
Cannot resolve method ‘println(java.lang.String)’
1. My solution:
Create the Lib directory under WEB-INF
Find two jar packages and add them to lib
As shown in the figure:
After copy, select jsp-api.jar, right-click, Add as Library.
servlet-api. Jar. the same to previous one, right click Add as library
Find the Artifacts of Project Structure, double-click the jar package in the figure, and then click OK
At this time, we still report an error and need to restart idea. After restarting, we find out Println red fades and the problem is solved
Other Solutions (You can Take a Try):
2. Direct file -> Invalidate Caches-> Invaliadate and Restart
3. Associate Tomcat to file -> Project Structure-> modules-> Dependencies-> Add library
4. When creating a new Java project, you should select Java Enterprise instead of webapplication in Java Java Enterprise will automatically associate Tomcat to dependencies)
Read More:
- The method println(boolean) in the type PrintStream is not applicable for the arguments (void) Error
- JSON parse error: Can not deserialize instance of java.lang.String out of START_OBJECT token
- [Solved] Wwagger error: java.lang.NumberFormatException: For input string: ““
- [Solved] java.lang.IllegalStateException: Cannot get a STRING value from a NUMERIC cell
- Idea Error: java: java.lang.OutOfMemoryError: GC overhead limit exceeded
- [Solved] IDEA Error: Unable to resolve column XXXX
- [Solved] java.lang.noclassdeffounderror when idea runs Flink: org/Apache/flick/API/common/executionconfig
- How to Solve Error: Android java.lang.IllegalStateException: Could not execute method of the activity
- [Solved] Flink Error: Cannot resolve method addSource
- Kafka error: ERROR There was an error in one of the threads during logs loading: java.lang.NumberFormatException: For input string: “derby” (kafka.log.LogManager)
- [Solved] jhat Analyzes dump File Error: java.lang.OutOfMemoryError
- [Solved] The method getContextPath() from the type HttpServletRequest refers to the missing type String
- JSP error: The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- Android Studio Error: String index out of range 0 [How to Solve]
- Java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; error resolution
- [Solved] The idea Lombok error: Method does not exist
- [Solved] IDEA Error: java: Compilation failed: internal java compiler error
- JSP web.xml file header web app error [How to Solve]
- IDEA generates Spring Boot project error: error: read timed out