Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Uploading a file in JSP and storing in mysql database

Posted on 2004-08-06
7
Medium Priority
?
240 Views
Last Modified: 2010-04-17
Hello i need to develop a JSP(SubmitJob.jsp) which is displaying a form first,after submitting the  form the data is storing in a mysql databse.Now what i want to do is :

i have 2 textboxes named :No of CPU's ,Architecture and one text box for uploading a file from my local system.These are the fields of the form and the table in the mysql database.
==========
No of CPU's :      
Architecture :      
PBS File Name:
==========

So i am not getting how to upload a file in JSP and store the file in the mysql databnase.Any help in this regard is greatly appreciated.

Thank you,
Rams.


0
Comment
Question by:ramsin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 30

Accepted Solution

by:
Mayank S earned 172 total points
ID: 11735837
Use: <input type="File"

- for selecting the file.
0
 
LVL 32

Assisted Solution

by:ldbkutty
ldbkutty earned 164 total points
ID: 11735841
Instead of storing the FILE in tha data-base(Which ofcourse is a tedious task), yopu can store the FILE in a general Folder and store the file path in the database. This could be easily done and also favored by most of the developers.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 11735879
It would be better to store file-path, of course. However, if you move the file to a different location, make sure that you also modify the file-path. All databases also don't allow the storage of binary data (your file could have any kind of data - normal text or something else).
0
 
LVL 2

Assisted Solution

by:javazoom
javazoom earned 164 total points
ID: 11781445
I would add to pay attention to store file in database depending on file size. It could be problem for very large files such as movies (1GB to 8GB). It will really slow down the database to store and extract them.

I would also add three components for uploads and downloads :
For upload, UploadBean :
http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html

For download, Download4J :
http://www.javazoom.net/jzservlets/download4j/download4j.html

For extended upload (HTTP, FTP) :
http://www.javazoom.net/applets/jclientupload/jclientupload.html

Hope it helps.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Make the most of your online learning experience.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Starting up a Project

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question