In my web application there is a form which can contain a huge amount of data (this depends on the result of a previous query). When the form reaches a certain size, the servlet cannot cope and an exception is thrown. It seems that the first attempt to fetch a request parameter causes the problem.
I have tried to reproduce the problem on my test server but do not get a problem even when the data size is greater than on the production server.
As a result, I am now wondering if there is a server setting which restricts the size of data which can be passed in a request. I can only assume that there is a difference in the way the 2 servers are configured.
The application server is Websphere 7. I have tried the application using IE9, current FF and current Chrome - all produce the same result.
The exception is
java.lang.IllegalArgumentException
com.ibm.wsspi.webcontainer.util.RequestUtils.parseQueryString 196
com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData 356
com.ibm.ws.webcontainer.srt.SRTServletRequest.parseParameters 2051
com.ibm.ws.webcontainer.srt.SRTServletRequest.getParameter 1651
com.acme.Servlet.getNDC 126
com.acme.Servlet.doPost 96
javax.servlet.http.HttpServlet.service 738
javax.servlet.http.HttpServlet.service 831
com.ibm.ws.webcontainer.servlet.ServletWrapper.service 1658
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest 940
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest 503
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest 181
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest 91
com.ibm.ws.webcontainer.WebContainer.handleRequest 875
com.ibm.ws.webcontainer.WSWebContainer.handleRequest 1592
com.ibm.ws.webcontainer.channel.WCChannelLink.ready 186
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination 453
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest 515
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest 306
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete 83
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted 165
com.ibm.io.async.AbstractAsyncFuture.invokeCallback 217
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions 161
com.ibm.io.async.AsyncFuture.completed 138
com.ibm.io.async.ResultHandler.complete 204
com.ibm.io.async.ResultHandler.runEventProcessingLoop 775
com.ibm.io.async.ResultHandler$2.run 905
com.ibm.ws.util.ThreadPool$Worker.run 1646
The code
protected String getNDC(HttpServletRequest request)
{
String user = request.getHeader("iv-user");
if (user == null)
user = "";
HttpSession session = request.getSession(false);
String sessionString = session == null ? "" : session.getId();
String action = request.getParameter(Constant.ACTION); <=== ERROR HERE
if(action == null)
action = "";
....