I have written a simple servlet which writes the submitted pdf to the c drive of the server. I have written the instructions in the pdf document which can be found here
Click here to access the pdf
Download the war file
Deploy it on your server
Design your form with a submit button configured to submit “PDF” and pointing to the url
The url should be of the following format
http://:/SaveToFile/SavePdf
in my case it was http://ginger:8080/SaveToFile/SavePdf. Where ginger:8080 is my server and port no.
Save the form and hit the submit button
The form will get submitted to the servlet which writes the pdf to the c drive of the server
Let me know if you need any more help
thanks
girish
Submitting PDF to a servlet
August 13, 2009 · 10 Comments
Categories: Uncategorized
Tagged: servlet, submit pdf, submitting to servlet
10 responses so far ↓
luca // September 1, 2009 at 10:00 am |
Hi, i think this should be usefull but in order to have the path to our server folder is needed more than a hosting service contract?
Do we need a dedicated server or some housing service?
Girish Bedekar // September 3, 2009 at 3:59 am |
Hi Luca
yes you will need a tomcat server, it is free and can be easily set up
let me know if you need any more help
thanks
girish
Junior Owolabi // September 2, 2009 at 9:06 pm |
Luca.. of course u need to have a host and plenty other things..
I remember when i first asked this question and didnt know what i was getting myself into..
This is a very good tool Only one thing missing, u have to know how to create a DB from scratch. If u cannot.. You are stuck!!! As the servelet needs something to submit to.
***********
Which leads to my next question.
1. I know u can submit a pdf via email (lets hold that thought.)
2. I know i can submit a pdf via servlet( req. php and db knowlege)
3. Now lets say im a dummy.. or lets just say i have a form with approx 300 fields. And idk how to make a db for it. How can i submit it to anythin.
I hope i havent lost u yet.??
OKay reason i ask is this.. Form a is filled out by you.. u hit submit.!
It submits to test@myhost.com. <–using outlook.
On that computer that is hosting that email, it is using outlook express and has LC ES 8.2 and Adbobe 9.. but no one uses that computer. So there is no one to say download the info on the email to adobe or LC db… am i making sense.?
Basically. i dont think email will work.. cause no one uses that pc. it sits by itself.
Girish Bedekar // September 3, 2009 at 3:57 am |
Hi Junior
Do you want to store the submitted pdf to the DB? If that is the case it is very easy, all you need to do is create a simple DB(mySql is great). In that DB create a table and in that table create a column of type BLOB. This column will store the pdf file. If you are in the US, I can walk you through the steps involved in this
let me know
thanks
girish
Junior Owolabi // September 3, 2009 at 2:00 pm |
i am in the US… Houston TX to be exact.. . I have My Sql.. I know how to load a DB.. i just dunno how to create one from scratch….
Junior Owolabi // September 3, 2009 at 2:01 pm |
and yea.. im trying to store thee submitted PDF to DB… thnx.
Junior Owolabi // September 4, 2009 at 6:44 am |
im up right now.. and im gonna stay up to about 430am my time.. im waiting on u to come online.
As it seems u come online at around 4ish my time everytime.
Junior Owolabi // September 8, 2009 at 10:40 pm |
Umm… hello. im still needing ur help.
Andrew L. Ayers // September 21, 2009 at 11:18 pm |
We are attempting to do the same thing, except using PHP on the backend. Strange thing is, we can get it to “work” (as in, the Adobe Reader submits -something-), but on the PHP side the “POST” variables ($_GET, $_POST, $_REQUEST, $_FILES) are empty. Adobe Reader is obviously posting something to the PHP script though, as it is running (I am echoing the those variables above to a text file on the server). Not sure where or what is happenning to the file…
Girish Bedekar // September 22, 2009 at 9:57 pm |
Hi Andrew
Sorry I am not familiar with PHP, if it was java I could help you
thanks
girish