Pack the running Tomcat (using the TAR-ZCVF command) and place it on a different server with a non-root decompression (using the TAR-ZXVF command) and configure it to start Tomcat after the following error
HTTP Status 500-java.lang.illegalstateexception:no output folder
Typeexception
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 was available in the
Apache tomcat/7.0.39 logs.
--------------------------------------------------------------------------------------------------------------- -------------------------
Org.apache.jasper.JasperException:java.lang.IllegalStateException:No output folder:
The main reason for this is the issue of permissions, in tomcat/work/catalina/localhost/, mainly this directory is not read and write permission, causing the file can not be compiled into the specified working directory, At this point we have to do with this directory to do some permissions to modify the permissions to at least 755 or more, while noting that the modification of the rights must be used as root to operate, otherwise can not be modified, after the modified JSP file in the localhost directory. The problem is that the file cannot be generated in work/catalina/localhost/, and it is still not possible to modify the entire directory of Tomcat, work the entire directory. Finally to the specific directory tomcat/work/catalina/localhost/to modify permissions OK.
The error I encountered was because the service was started with root, and then the service was started with another user, and the contents of the tomcat/work/directory were not deleted before it was started, and there was a Catalina directory where the owner was the root user. When you use another user to perform a startup, the Catalina is no longer recreated because it already exists, but the directory is incrementally modified, but the error occurs because the other user does not have permission to modify the directory and files that are owner root. It is recommended that you delete tomcat/work/* after each stop tomcat, and if you do not want to delete each time, make sure that the user who starts Tomcat every time is strictly correct.