473,434 Members | 1,379 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,434 software developers and data experts.

how to store and retrieve doc and pdf files from data base using struts2

1
Hi every buddy.. i need to store resume in mysql data base and also retrieve to display it in jsp page .what the data type should i use for database. i tried it as a blob type. and in action class i tried to store it as
String fn="file path ......";
File file = new File(fn);
fis = new FileInputStream(file);
ps=conn.prepareStatement("insert into filetable(FileName) values(?)");

ps.setBinaryStream(1, fis, (int) file.length());
also i tried
ps.setAsciiStream(1, fis, (int) file.length());

.. pls help me out
Aug 2 '10 #1
0 1446

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

Similar topics

3
by: jonas | last post by:
Guys was wondering has any done this I need to get a heads up as i need to grab data from a databasemake some changes and then put it back in place I'm guessing the MySqlDB Module be it seems...
4
by: david | last post by:
I remember that there are functions to do it, but I forgot their names. Anyone can give me a help? Thank you. David
14
by: sudheerk | last post by:
please give me a query for already existing name in the data base using mysql
4
hunnicutt
by: hunnicutt | last post by:
I want to be able to click on the save icon and have the data on the form save to the original database. Right now I seem to have a disconnected dataset I have tried to change everything from read...
1
by: indraneel | last post by:
i need to import data from a .csv file to a table in the database using DTS . Can any one tell me the steps to implement this ......????
3
by: ashokkuncha | last post by:
hi all, i am new bee and hope some one help me out. in my web application i am using access as data base, one table of the dabase has candidates details as records ( emp no, name , skill set...
5
by: faizalahmd | last post by:
How to display image in image control , which is retrieved from the data base . using c# in asp.net regards, FAIZAL AHMED.H
2
by: abehl | last post by:
Hi I have 2 combo boxes in a form. When the one combo box say COMBO1 is changed, onchange event runs with the option selected being appended to the url and the action associated with that action...
10
SaiRockinGuy
by: SaiRockinGuy | last post by:
Hi, How to retain values in jsp using struts2 tags. I am using <s:select></s:select> which has inbuilt properties in it. But the values are not retained when the page gets refreshed.Can...
2
by: kccced | last post by:
After splitting my data base I'm not sure where to put the back end database any help Thank You
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.