Troubleshooting
Problem
WARN: Form Content Truncated when attempting to pass through 200k data through JSP form to HTTP Server Adapter
Symptom
When attempting to pass form content of approximately 200000 bytes through a HTTP Server adapter, gets the following error even with the proper setting in tmp.sh:
[2010-12-22 11:14:48.868] WARN 000000000000 GLOBAL_SCOPE
[ConduitStreamListener4-0]org.mortbay.http.HttpRequest.extractParameters(HttpReq
uest.java:847) WARN!! Form content truncated
Proper settings should be:
(For the OS being AIX)
change the line in the
AIX) section from
SERVER_FLAGS="${SERVER_FLAGS}
-Dorg.apache.xml.dtm.DTMManager=org.apache.xml.dtm.ref.DTMManagerDefault"
to
SERVER_FLAGS="${SERVER_FLAGS}
-Dorg.apache.xml.dtm.DTMManager=org.apache.xml.dtm.ref.DTMManagerDefault
-Dorg.mortbay.jetty.Request.maxFormContentSize=1000000"
*For older versions of Jetty it may be necessary to use this:
-Dorg.mortbay.http.HttpRequest.maxFormContentSize (GIS 4.3 or
prior)
Also, the form content as it would generally
pass through the HTTP Client Adapter, rather than the HTTP Server Adapter,
would be to do the following:
Set the appropriate content-type/subtype:
The difference between an HTTP Client Post Service and a webapp JSP posting to
an HTTP Server Adapter is the kind of data being posted. Generally, we use the
HTTP Client Post to send a document via HTTP. The Content-Type/SubContent-Type
would be something like text/xml or text/html, and the document would be in
clear text (usually).
Insert the appropriate JVM flag in the
necessary service file: The JSP is submitting data from an html form, and the
browser generates a request that is of the type
application/x-www-form-urlencoded. The limit is in Jetty for this type of post.
According to KB article NFX8498, you can work around the limit by adding the
appropriate JVM flag in tmp.sh or installNoappWindowsService depending on
platform. Windows will require an uninstall/install of windows services.
Modify the JSP form so that it generates a content-type of
multipart/form-data, where you would provide the file location in the input
box, and then that particular document would be posted in a manner more like
what our http client adapter would do.
HTTP Server Adapter Log 12/22/2010 12:00:01 AM - http.log
6b0a1e10fd2c6cad:9e6d1fc:12cff6f5495:-7fe3
[2010-12-22 11:14:48.761]
DEBUG 000000000000 GLOBAL_SCOPE ConduitStreamListener.canAccept() - Ready to
accept new connection
[2010-12-22 11:14:48.761] DEBUG 000000000000
GLOBAL_SCOPE ConduitStreamListener.canAccept() - Submitting job to Jetty...
[2010-12-22 11:14:48.761] DEBUG 000000000000 GLOBAL_SCOPE
ConduitStreamListener.canAccept() - Calling handleNewConnection()
[2010-12-22 11:14:48.761] DEBUG 000000000000 GLOBAL_SCOPE
ConduitStreamListener.canAccept() - Determining cipher strength: Strong
[2010-12-22 11:14:48.761] DEBUG 000000000000 GLOBAL_SCOPE
ConduitStreamListener.initTls() - Setting up the TLS...
[2010-12-22
11:14:48.761] DEBUG 000000000000 GLOBAL_SCOPE ConduitStreamListener.initTls() -
clientAuth is false.
[2010-12-22 11:14:48.801] DEBUG 000000000000
GLOBAL_SCOPE ConduitStreamListener.handleNewConnection() - Starting ...
[2010-12-22 11:14:48.802] DEBUG 000000000000 GLOBAL_SCOPE
ConduitStreamListener.handleNewConnection() - context attributes:
{javax.servlet.context.tempdir=/etdev/GIS/tmp/local_node1_5610_951847360,
org.mortbay.http.ErrorHandler=ErrorPageHandler in null}
[2010-12-22
11:14:48.802] DEBUG 000000000000 GLOBAL_SCOPE
FlushingHttpConnection.handleNext() - first call.
[2010-12-22
11:14:48.864] DEBUG 000000000000 GLOBAL_SCOPE
ConduitStreamListener.customizeRequest() - CLOSE_CONN_4_BP_URI is false
[2010-12-22 11:14:48.864] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorFilter.doFilter - Starting for session ID [857]
[2010-12-22 11:14:48.867] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorFilter.doFilter - we do not have a real http session so this is
an old school request/response dmi http session
[2010-12-22
11:14:48.867] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorResponseWrapper.createOutputStream() - stream created
[com.sterlingcommerce.woodstock.services.pshttp.jetty.ActivityMonitorResponseStr
eam@9a409a4]
[2010-12-22 11:14:48.868] WARN 000000000000 GLOBAL_SCOPE
[ConduitStreamListener4-0]org.mortbay.http.HttpRequest.extractParameters(HttpReq
uest.java:847) WARN!! Form content truncated
[2010-12-22 11:14:48.929]
DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorResponseWrapperCustomWriter.write(): char encoding = ISO-8859-1
[2010-12-22 11:14:48.93] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorResponseWrapperCustomWriter.write(): char encoding = ISO-8859-1
[2010-12-22 11:14:48.93] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorResponseWrapperCustomWriter.write(): char encoding = ISO-8859-1
[2010-12-22 11:14:48.931] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorResponseWrapperCustomWriter.write(): char encoding = ISO-8859-1
.
.
[2010-12-22 11:14:48.942] DEBUG 000000000000
GLOBAL_SCOPE ActivityMonitorResponseWrapperCustomWriter.write(): char encoding
= ISO-8859-1
[2010-12-22 11:14:48.942] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorResponseWrapper.createOutputStream() - stream created
[com.sterlingcommerce.woodstock.services.pshttp.jetty.ActivityMonitorResponseStr
eam@9a409a4]
[2010-12-22 11:14:48.942] DEBUG 000000000000 GLOBAL_SCOPE
ActivityMonitorFilter.doFilter - Completed for session ID [857]
[2010-12-22 11:14:48.943] DEBUG 000000000000 GLOBAL_SCOPE
FlushingHttpConnection.handleNext() - returnVal is true
Log InLog in to view more of this document
Historical Number
NFX10694
Was this topic helpful?
Document Information
Modified date:
04 February 2020
UID
swg21554550