This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to submit PDF object to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to submit PDF object to servlet" Watch "how to submit PDF object to servlet" New topic

how to submit PDF object to servlet

achayya matta
Ranch Hand

Joined: Oct 27, 2005
Posts: 111

I am facing problem while getting PDF object in servlet.i am not able to see this object in the request.

Problem Description.
I have JSP page which renders a PDF file inside a DIV tag.

<object id="pdf" border="0" width="100%" height="100%" type="application/pdf" data="<c ut value="${fullURL}"/>" standby="Loading pdf..."/>

Now user can fill the PDF form and submit it to server.

It will be highly appreciated if somebody can tell me how to get this PDF OBJECT in servlet.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

PDF objects can't be submitted to the server.
When you submit a form in a PDF it sends the data to the server the same way that an HTML form does; in a string of name/value pairs.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
achayya matta
Ranch Hand

Joined: Oct 27, 2005
Posts: 111
Thanks for your reply sir.
I will try to do the same.
Vikrant Sahdev
Ranch Hand

Joined: May 31, 2007
Posts: 58
If this helps, try using Japser reports. They give you the PDF reports , once you specify the content type for pdf in your Struts action class.
You might have to spend some time learning Jasper reports API if you are a beginner, though its fairly straight forward. Try iReport , open source library.

Coming soon...
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Umm, what does JasperReport have to do with submitting a PDF? The PDF in question doesn't need to be generated - it already exists.
I agree. Here's the link:
subject: how to submit PDF object to servlet
It's not a secret anymore!