Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

FormCalc and XFA Post

Avatar

Level 1

Hi

Trying to POST to an endpoint (servlet in this case).

Must use FORMCALC (we can do this in javascript, but formcalc to avoid extend in LC)

Script does this:

var res= Post("http://localhost:9080/proj/Test",

"parm=1",

"application/x-www-form-urlencoded");

xfa.host.messageBox(res);

Nothing gets returned.

The servlet does this:

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

                    // TODO Auto-generated method stub

                    PrintWriter pw = response.getWriter();

                    System.out.println("Received POST request");

                    pw.println("Response from Post");

                    pw.flush();

          }

Nothing spectacular here.   Is it (as is my suspicion) that the Post command is an Adobe-incomplete implementation not accepting feedback or is it a case of a lack of documentation as there is zilch written up about return codes etc in here http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

thanks

1 Reply

Avatar

Level 10

Hi, I've not used the post function before, but the get works as expected.  The only sample I have seen of a post is in the blog, http://blogs.adobe.com/formfeed/2010/03/track_pdf_forms_with_omniture.html, maybe that will help?

Regards

Bruce