Expand my Community achievements bar.

FormCalc and XFA Post

Avatar

Former Community Member

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