I have developed complex program to submit PDF/XFA to server-side ASP.NET program.
I need now to do the same using Java server-side program.
The approach I am following is to break down the long and complex form into smaller sections. Each section will be a separate XDP form in HTML5 format, and it will have the following common buttons:
- Next
- Previous
- Jump to Section
- Save
- Complete
I am looking for a simple example to explain how to submit a HTML5 form to a Java server-side program (JSP or Servlet) and how to retrieve the submitted XML or the form fields and values.
I did some effort, but still need some help. Please download the basic HTML5 XDP form from here. See snapshots below for more details. The code to submit is placed under the "Save" button, click event:
var theBtnSubmit = cmdSubmitForm.resolveNode("#event").submit;
var theTarget = form_config.server_url.rawValue + "?" + "action=save" + "&form_id=" + form_config.form_id.rawValue + "§ion_id=" + form_config.section_id.rawValue;
theBtnSubmit.target = theTarget;
cmdSubmitForm.execEvent("click");
The JSP is very simple. You can download it from here. I used the following lines of code to get the InputStream and convert to string:
ServletInputStream ris = request.getInputStream();
String theString = IOUtils.toString(ris);
I developed a simple Java program using JSP under a Dynamic Web Project.
The problem:
On the server, I am unable to retrieve the form fields and values in XML format. What I am getting is the concatenated values of the fields which are filled.
Tarek

The hidden Submit Button "cmdSubmitForm:



