Correct me if am wrong, ever since Tomcat 7.0.x versions and above, the minimum size for a deployable WAR file is set to 50 MB by default. So if you're WAR file exceeds 50 MB limit, you will get the IllegalStateException error.
There is a fix for this problem. This file size limit can be increased to a value higher than 50 MB.
Go to the location : TOMCAT_HOME/webapps/manager/WEB-INF folder. We need to edit the web.xml file here.
Before editing, I suggest you create a backup of the original web.xml ( cp web.xml web.xml.bkp )... Just in case...
Now open the web.xml and search for the attribute "max-file-size". You see the default value is set to 52428800 i.e 50MB. Increase it to let's say 100 MB (104857600 in bytes).
Also increase the value of the attribute "max-request-size" to 100 MB (104857600 in bytes).
Restart tomcat to bring the changes into effect.
Now you can deploy a 100 MB WAR file onto Tomcat without getting any error.
There is a fix for this problem. This file size limit can be increased to a value higher than 50 MB.
Go to the location : TOMCAT_HOME/webapps/manager/WEB-INF folder. We need to edit the web.xml file here.
Before editing, I suggest you create a backup of the original web.xml ( cp web.xml web.xml.bkp )... Just in case...
Now open the web.xml and search for the attribute "max-file-size". You see the default value is set to 52428800 i.e 50MB. Increase it to let's say 100 MB (104857600 in bytes).
Also increase the value of the attribute "max-request-size" to 100 MB (104857600 in bytes).
Restart tomcat to bring the changes into effect.
Now you can deploy a 100 MB WAR file onto Tomcat without getting any error.
No comments:
Post a Comment