It turned out that it was not caused by the lack of jar package.

Today, I wrote the beginning of the shopping project of Shangxuetang, and an error occurred:


org.apache.jasper.JasperException: Unable to compile class for JSP

某类不可以被引用(这里把日志翻译了一下)
Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java: 856)

At first, I thought it was caused by the lack of jars. Later, I copied the same jar package as the shopping example project, but restarting is still not enough.

Later, I saw an article saying that he also encountered this problem when he transplanted, and then I re-checked the path to compile the class, only to find that there is no classes folder under WEB-INF, and of course, the compiled class was not placed in under this folder.

 

Solution:

       Create a classes folder under WEB-INF, and then set it in properties as shown in the attachment

 

Analyze the reasons:

      In fact, many problems can be found from the source, such as this problem. In fact, the final class file is read.

      

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326992978&siteId=291194637