Monday, July 25, 2011

Large WAR file deployment in Tomcat 7

Tomcat 7 Manager application complains while deploying a larger WAR file. Here is error message:

The server encountered an internal error () that prevented it from fulfilling this request.

Exception java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because its size (XXX) exceeds the configured maximum (52428800)

Here is a solution:
Go to the web.xml of the manager application (@: TOMCAT_HOME/webapps/manager/WEB-INF/web.xml)
Increase the max-file-size and max-request-size:
Set these values greater than your WAR file size.



52428800
52428800
0