[Solved] org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder

Today, after making changes to a WebApp, exporting it as a war package, and publishing it to Tomcat7, I couldn’t access it!

I tried to refresh the address bar in FireFox, happened to have a response to the home page, the background image can be seen, but the login box under a large area of exception information, I took a closer look is that a certain page loaded with jsp: include is missing.

At this point I thought there was an error in the package, so I went into the server’s WebApp directory to find the unpacked file, and strangely enough found the page in question in place!

The exception message said no, but the file was fine in the directory, what’s going on?

I thought that there were several static pages in the WebApp directory, and after confirming their existence, I tried to enter the address in the address bar, and once I entered, the following exception appeared.

JasperException: java.lang.IllegalStateException: No output folder:

?! There is a problem. After searching on the web, the general reason is that a directory does not have read/write permissions, so the file cannot be compiled into the specified working directory. I guess all JSP files are not compiled into Servlets.

The user who started Tomcat 7 during the upload was not root, but another user, rts. In the past, after starting Tomcat with the root user, there was not a single error after the upload. The last time there was an error, because some programs had to be started by the rts user, it switched between the root and rts users several times. rts user and root user permissions are obviously different, and this should be the reason why a directory does not have read and write permissions.

So shutdown tomcat, switch to the root user, startup tomcat, and then upload war, and after that the WebApp was started correctly.

Then shutdown tomcat, switch to the rts user, start tomcat, and the WebApp and another app that must be started with rts are started.


Similar Posts: