Expand my Community achievements bar.

parameter to processFormSubmission: how to build "byte[] cRequestBuffer" from httpServletRequest

Avatar

Former Community Member
Hello,



I am using Livecycle Forms 7.0.1 with weblogic 8.1 portal. After the user submits the form, I need to make a call to processFormSubmission() to get the posted data in xml format.



Due to some reason, weblogic portal pre-reads the input stream and I can not pass the httpServletRequest object to processFormSubmission. Instead, I have to pass the posted paramaeters as "byte[] cRequestBuffer" to processFormSubmission.



My question is - how to reconstruct "byte[] cRequestBuffer" from httpServletRequest. I tried to use httpServletRequest.getParameterNames() as follows. But it does not return any value posted by Adobe Form. In the debugger, however, I can see all the posted parameters in the request.parameters variable.



Any help would be appreciated.



Thanks in advance.



Enumeration paramNames = request.getParameterNames();

StringBuffer sb = new StringBuffer();



while(paramNames.hasMoreElements()) {

if (sb.length() > 0)

sb.append("&");



String paramName = (String) paramNames.nextElement();

sb.append(java.net.URLEncoder.encode(paramName));

sb.append("=");



String[] paramValues = request.getParameterValues(paramName);

sb.append(java.net.URLEncoder.encode(paramValues[0]));

}
0 Replies