报错如下:Servlet.service() for servlet [jsp] in context with path [] threw exception [java.lang.IllegalStateException: No output folder] with root causejava.lang.IllegalStateException: No output folder
以及:
exception
org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:536)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:362)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.IllegalStateException: No output folder
org.apache.jasper.JspCompilationContext.createOutputDir(JspCompilationContext.java:678)
org.apache.jasper.JspCompilationContext.getOutputDir(JspCompilationContext.java:197)
org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:514)
org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:445)
org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:392)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
我出现这个错是因为tomcat文件夹的权限有问题,只有root状态下才能使用,所以我就索性把权限全部改成了777。
进入tomcat文件夹,输入以下代码:sudo chmod 777 * -R
就OK了。