data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp

data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp

data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp with script of data base plz help me

View Answers

April 13, 2012 at 11:05 AM

JSP Insert and Retrieve image from MYSQL database

<%@page import="java.sql.*,java.io.*"%>
<%
try{
    InputStream sImage;
Class.forName("com.mysql.jdbc.Driver");
           Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root");
File imgfile = new File("C:/flower3.jpg");
      FileInputStream fin = new FileInputStream(imgfile);
      PreparedStatement pre = con.prepareStatement("insert into image(images) values(?)");
      pre.setBinaryStream(1,fin,(int)imgfile.length());
      pre.executeUpdate();
      System.out.println("Inserting Successfully!");
      pre.close();
      Statement st=con.createStatement();
      ResultSet rs=st.executeQuery("select images from image where id=1");
if(rs.next()){
byte[] bytearray = new byte[1048576];
int size=0;
sImage = rs.getBinaryStream(1);
response.reset();
response.setContentType("image/jpeg");
while((size=sImage.read(bytearray))!= -1 ){
response.getOutputStream().write(bytearray,0,size);
}
}
rs.close();
st.close();
con.close();
}
catch(Exception ex){
out.println("error :"+ex);
}
%>









Related Tutorials/Questions & Answers:
data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp
data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp   data (image ,audio) inserting to data base (oracle 10g) and retriving the same data from jsp with script of data base plz help me
inserting same data to different tables in oracle
inserting same data to different tables in oracle  Hi there ...! i have to insert un,pwd, to three oracle tables, like admin, user, stud, but i want pickup these table names from a drop down list in html...is there any chance can
Advertisements
inserting same data to different tables in oracle
inserting same data to different tables in oracle  Hi there ...! i have to insert un,pwd, to three oracle tables, like admin, user, stud, but i want pickup these table names from a drop down list in html...is there any chance can
inserting same data to different tables in oracle
inserting same data to different tables in oracle  Hi there ...! i have to insert un,pwd, to three oracle tables, like admin, user, stud, but i want pickup these table names from a drop down list in html...is there any chance can
inserting same data to different tables in oracle
inserting same data to different tables in oracle  Hi there ...! i have to insert un,pwd, to three oracle tables, like admin, user, stud, but i want pickup these table names from a drop down list in html...is there any chance can
inserting same data to different tables in oracle
inserting same data to different tables in oracle  Hi there ...! i have to insert un,pwd, to three oracle tables, like admin, user, stud, but i want pickup these table names from a drop down list in html...is there any chance can
inserting same data to different tables in oracle
inserting same data to different tables in oracle  Hi there ...! i have to insert un,pwd, to three oracle tables, like admin, user, stud, but i want pickup these table names from a drop down list in html...is there any chance can
Problem in inserting clob data in jsp
Problem in inserting clob data in jsp  how to insert any rich text editor data (which have more than 32766 characters) in a clob type column of oracle database with jsp
retrive data from oracle to jsp
retrive data from oracle to jsp  i am a beginer in jsp so please help... cost and manager name and storing it in the data base. in search proj fiel... connected to data base
how read data from doc file in same formate in jsp
how read data from doc file in same formate in jsp  how we can read and display data on jsp page, from doc file with the same formatting
Unable to connect servet, jsp to oracle 10g database.. Unable to retrieve data..
Unable to connect servet, jsp to oracle 10g database.. Unable to retrieve data... from oracle sql*plus as rajalakshmi and password by granting privilege from scott... max("+pkid+") from "+tableName); if(rs.next
Retrieving data from data base using jsp combo box
Retrieving data from data base using jsp combo box  Hi guys please help me , i have on GUI page int that Server type(like apache,jboss,weblogic) one... of the server it has to display the process name from database into the process name
Retriving data stored in database
Retriving data stored in database  Hi, How to retrive data from my sql database using Hibernate,Spring and tapestry please give me an example.I am new to this Hibernate and Spring
inserting data from radio buttons to database - JSP-Servlet
inserting data from radio buttons to database  hi, my problem is as follows: i am creating a feedback form of a college. this feedback form... of radio buttons. the feedback.jsp should look like same as follows: Please
inserting data from radio buttons to database - JSP-Servlet
inserting data from radio buttons to database  hi, i am getting error in my code of feedback form. once i finished selecting all the radio buttons and when i click on delete button. it points to the answer.jsp. answer.jsp
inserting data from radio buttons to database-ERROR - JSP-Servlet
inserting data from radio buttons to database-ERROR  hi, i have already changed the option field of table question. the code which you give me has the option field as options. but it is option in the table,so i changed
Retriving data from MYSQL without line break using java
Retriving data from MYSQL without line break using java  get data without line breaking from mysql table (i.e data stored as mediumtext )using java
data fecth from data base in( sql 2000) htmlform and jsp
data fecth from data base in( sql 2000) htmlform and jsp  hi iam using jsp and html form data fecth from database display the textbox help me i want whenever select from dropdown list select the projectname to display
how to insert the bulk data into the data base from the table of jsp page to another jsp page
how to insert the bulk data into the data base from the table of jsp page to another jsp page  pls help i'm doing the project called centralized... to insert the marks details into the data base i have retrive the rollno and name
problem on jsp, inserting data into table(mysql).
problem on jsp, inserting data into table(mysql).  hello friends, I have a problem in jsp.I want to insert data, which is given by user through... is in mysql.I want to use placeholder("?") to insert data into table.Plsssss help
retriving data from sql server using jsp code and placing them in text fields of html code
retriving data from sql server using jsp code and placing them in text fields of html code  Hi, my question is how to retrieve data from sql server 2008 using a jsp file and place the values in the text fields of a html file
JSP data base validation
JSP data base validation  please explain how to validate form input string with database n also how its notify that entered data exists already... into student2(id, sName, phno) values(?,?,?)"; String sql2 = "select * from student2
retrive data from data base and print it in every page until logout
retrive data from data base and print it in every page until logout  ... the USER NAME through retriving from database.suppose from home page he go to next... in JSP
how to load a table of data from oracle, to a jsp page using hashmap.
how to load a table of data from oracle, to a jsp page using hashmap.  I have a jsp page which ask for project ID,team name,member name according to this data i have to retrieve their details from the database(oracle). I have
Inserting data on a database in servlet - JSP-Servlet
Inserting data on a database in servlet  Hi I am following... to a databse by a servlet.I used the example in "Inserting Data In Database table... of a table,that is none of the data which i tried to enter into database by using
Retrive the data from the table in data base using jdbc
Retrive the data from the table in data base using jdbc  Retrive the data from the table in data base using jdbc   JDBC Tutorials
getting int values from form and insert it in data base in jsp
getting int values from form and insert it in data base in jsp  how...; Hi, You can get the parameter from the request object: String s... = Integer.parseInt(s); Then you can write JDBC code to insert data
for store data in data base - JSP-Servlet
for store data in data base  i want to a job site, in this site user..... and on 3rd form i use submit button... data of form 1 and 2 can also be store... Friend, We have created 4 jsp files: 1)login.jsp: A:hover
How to get data from Oracle database using JSP
problem in jsp in the sense to get data from the database like oracle . I have... data from the database like oracle), I have created one jsp program like... in the sense to get data from the database like oracle . I have created one jsp
Is big data and data science same?
Is big data and data science same?  Hi, I am beginner in Data...: Is big data and data science same? Try to provide me good examples or tutorials links so that I can learn the topic "Is big data and data science same?"
Is Data Analyst same as data scientist?
Is Data Analyst same as data scientist?  Hi, I am beginner in Data...: Is Data Analyst same as data scientist? Try to provide me good examples or tutorials links so that I can learn the topic "Is Data Analyst same as data
Inserting Data into mysql - SQL
Inserting Data into mysql  My sincere apologize for this post. I... into the SQL category though under php. I need help with reading from a csv file (using php)and inserting the details in a mysql database. Lets take for instance
inserting data into datafields
inserting data into datafields  I was raised with a query.... there is a button, on click on it....... few fields regenerates and the details entered there should be inserted into Database Number of times we click that button
Data extraction from an image file.
Data extraction from an image file.  I have made an image... data from the the image which also include deleted data.Can i used java to extract these data from the image file? Which are the libraries to be used
error in uploading image from jsp to oracle 10g database
error in uploading image from jsp to oracle 10g database  ... try to insert into the image into the database i got the above error please advice how to get rid of error   JSP upload image in Mysql database
Data fetching from JSP or HTML - JSP-Servlet
Data fetching from JSP or HTML  Hi Deepak, Can u pls help me as i have a problem with jsp/html frameset. my question is how can i fetch the data from frameset which is in html format.pls help me. Thanks
how to display data from database in jsp
how to display data from database in jsp  how to display data from database in jsp
take data from one table and insert same in another
take data from one table and insert same in another  I want to know when a new field update in table and the same data has to update in another table
reading data from a text box with the same name using servlets - JSP-Servlet
reading data from a text box with the same name using servlets  Hello sir, i want to get the values from four textboxes having the same name like a= b= c= using servlet i want to print all the values from each text
Is data science and analytics same?
Is data science and analytics same?  Hi, I am beginner in Data...: Is data science and analytics same? Try to provide me good examples or tutorials links so that I can learn the topic "Is data science and analytics same
read excel data from jsp - JSP-Servlet
read excel data from jsp  Hi how to read excel file from jsp? Excel file is created manually entered data having many sheets? and read the entire sheet and also edit with jsp? pls suggest me?   Hi Friend, 1
data base
data base  how to connect coding in data base ?   The given code connects JSP page to database. You need to import the mysql connection jar file to jdk as well as to the lib of tomcat. Moreover you need to set classpath
how to read data from excel file through browse and insert into oracle database using jsp or oracle???
how to read data from excel file through browse and insert into oracle database using jsp or oracle???  sir.. i have number of excel sheets which...://www.roseindia.net/answers/viewqa/JSP-Servlet/28123-write-excel-file-into-the-oracle
data are not display in JSP from database - JSP-Servlet
data are not display in JSP from database   i want to finding some data through a SQL query from SQL server database to a JSP page based on some... of this jsp page. like.. School Result and three request parameters 'class', 'from
retriving image from database - JSP-Servlet
retriving image from database  how to retrive image from mysql database by using servlet programming  Hi Friend, Please visit the following link: http://www.roseindia.net/servlets/retreiveimage.shtml Thanks
DATA BASE
:3306/test", "root", "root" ); String sql = "Select name,address from data...DATA BASE  Create a program to establish a connection to the PCTBC... the data using a J Table.   Here is a code that connects to MySql
Inserting data in Excel File - Java Beginners
Inserting data in Excel File  Dear Sir, How can we fill the excel with fetched data from the database like Oracle, DB2? Is it possible to create an excel with filled data? Kindly give me the solutions to questions
problem in inserting data in databases created in netbeans using jsp..
problem in inserting data in databases created in netbeans using jsp..  i am trying to make a virtual classroom website in jsp using netbeans.i...+")"); out.println("Data is successfully inserted!"); } catch(Exception e
jsp with excel sheet data uploading into database
jsp with excel sheet data uploading into database  how to upload data in excel sheet with jsp into oracle 10g database
How to get the data from the database (Oracle) in console or in ie using servlet or jsp as Front end
How to get the data from the database (Oracle) in console or in ie using servlet or jsp as Front end  hello i have a simple problem in jsp in the sense to get data from the database like oracle . I have created one jsp

Ads