473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Upload

Hi
Plz help me out in saving an uploaded file into oracle using struts and jsps....

Thanks
Feb 4 '08 #1
4 1370
r035198x
13,262 8TB
Hi
Plz help me out in saving an uploaded file into oracle using struts and jsps....

Thanks
What have you done so far?
Feb 4 '08 #2
hi
actually uploading a file n storing it in database is part of my application.
The things i have done are i have written my jsp page and the setter and getter methods of the file...
now im stuck with database query of inserting the file into the database.i have no clue abt how to proceed with it.
can u plz help me out......

Thanks
Feb 5 '08 #3
BigDaddyLH
1,216 Expert 1GB
hi
actually uploading a file n storing it in database is part of my application.
The things i have done are i have written my jsp page and the setter and getter methods of the file...
now im stuck with database query of inserting the file into the database.i have no clue abt how to proceed with it.
can u plz help me out......

Thanks
Clearly this problem breaks down into at least 2 steps:
  1. Uploading the file
  2. Storing the file
Some web application frameworks have built in support to make uploading a file easy. Otherwise, you might consider using something like Apache Commons FileUpload: http://commons.apache.org/fileupload/

Are for storing the file in a database, there are two common solutions to this. One is to just store the file in the file system of the server and store the path of this file (as a string) in the appropriate column in the appropriate database table.

The other approach is to store the contents of the file as data in a column. Such a column with have type BLOB (or CLOB if storing text). If your are using JDBC directly, inserting the data into the column is easy: use a PreparedStatement and setBinaryStream or setCharacterStream. For more information: http://java.sun.com/docs/books/tutorial/jdbc/index.html
Feb 5 '08 #4
Thank u so much that had helped me a lot
If any queries i will get back u



Clearly this problem breaks down into at least 2 steps:
  1. Uploading the file
  2. Storing the file
Some web application frameworks have built in support to make uploading a file easy. Otherwise, you might consider using something like Apache Commons FileUpload: http://commons.apache.org/fileupload/

Are for storing the file in a database, there are two common solutions to this. One is to just store the file in the file system of the server and store the path of this file (as a string) in the appropriate column in the appropriate database table.

The other approach is to store the contents of the file as data in a column. Such a column with have type BLOB (or CLOB if storing text). If your are using JDBC directly, inserting the data into the column is easy: use a PreparedStatement and setBinaryStream or setCharacterStream. For more information: http://java.sun.com/docs/books/tutorial/jdbc/index.html
Feb 6 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
2
by: Sean Dotson | last post by:
I have a form that passes variables to an asp file and then uploads a file. For some reason the request.form is not getting the info from the form. It's returning blanks. Any insight would be...
0
by: SEMIH DEMIR | last post by:
Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa persistin upload componentini kullanacam yanlız suanki haliyle...
1
by: Alex | last post by:
I am having issues with a script to upload files from a client to a webserver. The problem is not with the actual upload but with where it uploads. The whole process is supposed to create a...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
9
by: 8anos | last post by:
Hello, I am new at the community and newbie at programming :) As you may know rapidshare provides a perl script for linux, to upload files at their servers. You can find the original scripts at...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.