I am new to Tomcat on Windows. I am trying to deploy my Java project which I have made in RHEL 5 using Tomcat. Now I want to run that project on window. So I copied and pasted my project folder inside the Tomcat web apps Directory
i.e C:\Program Files\apache-tomcat-6.0.37\webapps
but I am unable to run the project as I am facing below error while opening my first login page. Do I need to make any further changes in code or web.xml file as I am now deploying it on Windows?
type Exception report
message java.lang.IllegalStateException: No output folder
**Description** The server encountered an internal error that prevented
it from fulfilling this request.
Exception
org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:538)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
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:723)
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:453)
org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:399)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
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:723)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.37 logs.
I have given complete access to my Tomcat Directory. Now i am not getting this error. Thanks !!
I was facing the similar problem on ubuntu 14.04. I was doing some analysis and dropped the work folder manually. Then while running the tomcat server I was getting same exception. The issue was, when we access the manager application of tomcat, it requires jsp page to display the content, and JSP page is rendered from the generated class file which resides in work/Catalina/localhost/.... folder.
I created the work directory manually, however the problem was still not solved.
Then I realized that, because I manually created the work directory tomcat7 user didn't have the permission to write on that directory. Changed the owner for work directory from root to tomcat7
sudo chown tomcat7 work
restart tomcat service tomcat restart.
Problem solved.
Hope this helps
If you are on Linux/Unix and facing the issue:
STEPS:
Note the User and the service ,in my case it was tomcat yours could be anything else...
1. mkdir work
2. sudo chown tomcat work
3. service tomcat6 restart
As your start tomcat as the root account firstly, the work folder was already created. You run tomcat as the account tomcat, as tomcat account has no permission to the folder ./work, so throw the exception. To solve it, ps remove ./work, and then restart tomcat by the tomcat user.
Check your Disk space ?
I also got this error when my / partition had filled up. Freeing up some disk space removed this error for me.
I have changed the permissions for the work directory and it's working...
Steps:
1. Go to the directory where tomcat is present
2. Execute the command:sudo chmod 777 work
give the full permission to tomcat directory and then restart the service.It will works for me ,I hope this will work you as well.
It can be because of lack of write permissions to cache directory (/var/lib/tomcat6 on Linux). If this is your case, use the following commands to grant full access and restart Tomcat:
sudo /etc/init.d/tomcat6 stop
sudo chown -R tomcat6 /var/lib/tomcat6
sudo chmod -R 777 /var/lib/tomcat6
sudo /etc/init.d/tomcat6 start
If this was working for you previously, sometimes the work directory is simply in a bad state and you can fix it by simply deleting it and allowing Tomcat to create a new one from scratch.
Try restarting the server completely (if applicable)
来源:https://stackoverflow.com/questions/18348741/message-java-lang-illegalstateexception-no-output-folder