Posts

Showing posts with the label Tomcat

Deploy Spring Boot application on Tomcat

Deploy Spring Boot application on Tomcat Step #1 Add the following dependency to pom.xml in order to tell Spring Boot not to use its embedded Tomcat. < dependency >      < groupId > org . springframework . boot < / groupId >      < artifactId > spring - boot - starter - tomcat < / artifactId >      < scope > provided < / scope > < / dependency > Step #2 Change the packaging property to war in pom.xml. < properties >        < packaging > war < / packaging > < / properties > Step #3 Replace your initializer class with the following: package com.oms; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServ...

How to remove POST size limit

The connector section has the parameter maxPostSize   The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes). Another Limit is: maxHttpHeaderSize The maximum size of the request and response HTTP header, specified in bytes. If not specified, this attribute is set to 4096 (4 KB). You find them in $TOMCAT_HOME / conf / server . xml   1.Find the tag entry for the HTTP 8080 connector 2.Add the maxPostSize="0" attribute and value to this tag such that it looks like:      maxHttpHeaderSize="8192"     maxThreads="150"     minSpareThreads="25"     maxSpareThreads="75"     enableLookups="false"     redirectPort="8443"     acceptCount="100" ...