File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Upload pdf file to mysql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Upload pdf file to mysql database" Watch "Upload pdf file to mysql database" New topic

Upload pdf file to mysql database

Laxmikant Kumbhare
Ranch Hand

Joined: Sep 19, 2011
Posts: 38
In my application i need to upload a PDF file to Mysql database. Please help me!

tell me datatype for column in mysql

and complete procedure in jsp

Thanks in advance!
Tim Moores

Joined: Sep 21, 2011
Posts: 2409
PDFs are binary data, so you'd use a BLOB field. Having to do with I/O and DB operations, you wouldn't do this in a JSP, but in a servlet. A package like Apache Commons FileUpload makes the file upload part quite easy.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63534

See the JspFaq for more information.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Upload pdf file to mysql database
It's not a secret anymore!