java.lang.IllegalStateException: No output folder

tomcat 7环境变量配置好了,jdk运行正常,为什么访问本地服务器出现这问题?  


关键是在MyEclipse中启动tomcat会出问题,但是单独启动tomcat又木有问题,折腾了几天。特记!


HTTP Status 500 - java.lang.IllegalStateException: No output folder
typeException report
messagejava.lang.IllegalStateException: No output folder
descriptionThe server encountered an internal error that prevented 
it from fulfilling this request.
exceptionorg.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:391)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
root causejava.lang.IllegalStateException: No output folder
org.apache.jasper.JspCompilationContext.createOutputDir(JspCompilationContext.java:738)
org.apache.jasper.JspCompilationContext.getOutputDir(JspCompilationContext.java:196)
org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:581)
org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:461)
org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:425)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:639)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
noteThe full stack trace of the root cause is available in the 
Apache Tomcat/7.0.39 logs.


----------------------------------------------------------------------------------------------------------------------------------------

org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder:
关于这个原因主要是权限的问题,在tomcat/work/Catalina/localhost/,主要是这个目录没有被读写的权限,导致文件不能被编译到该指定的工作目录中,此时我们就要针对与这个目录做一些权限的修改权限至少要达到755或者以上,同时注意此处修改权限必须用root身份进行操作,否则不能进行修改,修改完后编译好的jsp文件就在localhost的目录当中了


发现了问题在于work/Catalina/localhost/中无法生成对应文件,把tomcat整个目录、work整个目录都修改了权限仍然不行。最后到具体的目录tomcat/work/Catalina/localhost/进行修改权限OK

你可能感兴趣的:(java.lang.IllegalStateException: No output folder)