Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: JSP problem after PDF Form Submit
Conf: (P-PDF) Developers, Msg: 71247
From: jander
Date: 8/27/2002 12:51 AM


Our project team is using a PDF with Acrobat Form fields behind it to submit form data to a java servlet, where it is parsed and written to a legacy system.

Our problem: when we return a jsp confirmation page back to the user, we are getting intermittent responses - sometimes the user will see the page, sometimes not. Also of note - the URL address location in the browser is being changed to "C://TEMP/xxxxxx.html", instead of showing "http://myserver/myapp/confirmPage.jsp". In effect, it doesn't retain the server location from which the form data was submitted - instead, after the jsp on that server is rendered into html, it is being written to a temp location on the local hard drive as an .html page, then displayed from there.

In my debug testing, I have bypassed my application code, submitting into the servlet and returning the jsp right back to the user. It works properly when submitted from an HTML page, but goes to the C://TEMP... route when submitted from the PDF. Therefore, I can conclude that the bug is not in our java code and is not in the jsp code.

On our PDF we are using a javascript submitForm() function, naming our servlet to sent to (without appending #FDF on it) and specifying "false" as our second parameter, since we are passing the data as an HttpRequest instead of as FDF data.

I suspect the problem may be caused by some differences in the headers in the HttpRequest object coming from the PDF. In comparing the Request headers from the PDF submit and those from an HTML page submit:

From the PDF:
content-type = application/x-www-form-urlencoded
user-agent = Mozilla/4.0 (compatible; Adobe Acrobat Control Version 5.00 for ActiveX)

From an HTML submit:
content-type = text/html
user-agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)

I have tried explicitly setting the headers to match those coming in from an HTML submit but this doesn't seem to make a difference.

Any thoughts?


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.