Submit a Acroform

Submit a Acroform

Forum member · Jun 7, 2007
I created a PDF with a Acroform containing a textfield and a button in it. For the button, attached a UrlAction pointing it to a servlet (running on Weblogic). When I click the submit button, the servlet does get a request but when I try to get the parameters (using request.getAttribute()), I get null. I then replaced the UrlAction with a SubmitAction. Now, the servlet is not even getting this request which I click the submit button. In Acrobat Professional, I get a 'General Error' message. Any help would be apprciated. Thanks CS

Re: Submit a Acroform

Support · Jun 7, 2007
Hello, When using the UrlAction, can you check the string that is being passed to the UrlAction class and make sure that it does have attributes. The reason it returns null is because no attribute of the given name exists. Also make sure that you are passing the name of the attribute in the request.getAttribute() method. Are you trying to read the TextField name and its value when clicking on the button? Thanks, ceTe Software Support Team

Re: Submit a Acroform

Forum member · Jun 8, 2007
Hi, Thanks for you reply. I got the SubmitAction working. The servlet was coded with only a doGet(). From the weblogic logs, found that when a submit is done, it does a POST. So, adding the doPost() method resolved the issue. The servlet is now getting the data in the form. Next question. If I want to send back a message like 'Form submitted successfully' OR 'Form submission failed' to the user, how do I do that? Thanks Kumbhi

Re: Submit a Acroform

Support · Jun 8, 2007
Hello Kumbhi, You will have to redirect the user to the page that displays the message. You can try using response.sendRedirect("url") if u want a client-side redirect or use requestDispatcher which accepts request and response objects as arguments if u want a server side redirect. Thanks, ceTe Software Support Team