JAVA -tomcat- Request header is too large

INFO: Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Request header is too large
    at org.apache.coyote.http11.InternalInputBuffer.fill(
    at org.apache.coyote.http11.InternalInputBuffer.fill(
    at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(
    at org.apache.coyote.http11.AbstractHttp11Processor.process(
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
    at org.apache.tomcat.util.threads.TaskThread$

How could I solve this in my spring web application?

I had gone through this thread Request header is too large


Solved! I was using HTTP GET instead of HTTP POST. Technically I have seen HttpGet will have issue if the URL length goes beyond 2000 characters. In that case, it’s better to use HttpPost or split the URL. Browsers have limits ranging on the 2kb – 8kb

Tomcat: Request header Too large