GeeCON Prague 2014*
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


JavaRanch » Java Forums » Java » Servlets
Bookmark "how to submit PDF object to servlet" Watch "how to submit PDF object to servlet" New topic
Author

how to submit PDF object to servlet

achayya matta
Ranch Hand

Joined: Oct 27, 2005
Posts: 111
Hi,

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
Sheriff

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... www.javatales.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
Umm, what does JasperReport have to do with submitting a PDF? The PDF in question doesn't need to be generated - it already exists.


Ping & DNS - my free Android networking tools app
 
GeeCON Prague 2014
 
subject: how to submit PDF object to servlet