Highlighted

Handling servlet response type "Text/Html"

Avatar

Guest

29-10-2008

I have a submit button that posts HTTP request to process the data that is filled in the pdf. In my servlet I have the following code:



response.setContentType("text/html") to send a confirmation back to the user.



Now, when I submit the form using preview pdf in livecycle designer 8 or adobe reader 8, everything works great.



However, when I use adobe reader 9, the form data is posted (the data is written to a file and I can see the submitted data), but I receive a dialog box that states the following. "An error occured during submit process. Cannot process content of type "text/html"..



Appreciate if anybody could quickly help on this one.

Replies

Highlighted

pguerett

30-10-2008

When you are in preview the form is being housed by an ActiveX control in a browser control. When the HTML is returned the browser knows how to deal with it and displays the HTML correctly.



When you render standalone the HML is returned to Acrobat and it does not know how to deal with it so that error is generated. Instead of returning HTML return a PDF and it will work fine.