Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet How to display multiple images in jsp

Have Programming Question? Ask it here!
 
 
 


jayakrishna
How to display multiple images in jsp
0 Answer(s)      9 months ago
Posted in : JSP-Servlet


<%@ page import="java.io.*"%>
<%@page import="book.Databasecon"%>
<%@ page import="java.sql.*,java.util.*"%>
<%!OutputStream o; %>
<%!ArrayList<Blob> bl; %>
<html><body>
<%
try {
Connection con =Databasecon.getInstance();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select IMAGE from student_profile ");
//ResultSet rs1=stmt.executeQuery("select count(id) from student_profile");
 bl=new ArrayList<Blob>();
while(rs.next()) {
System.out.println("st-1");
bl.add(rs.getBlob(1));
System.out.println("st-2");
}
//if(rs1.next())
//System.out.println(bl.size()+"size="+rs1.getInt(1));
for(int i=0;i<bl.size();i++){
System.out.println("st-3");
Blob b=bl.get(i);
System.out.println("st-4 "+b);
byte brr[]=new byte[(int)b.length()];
System.out.println("st-6");
brr=b.getBytes(1,(int)b.length());
System.out.println("st-7 "+brr);
// display the image
response.setContentType("image/png");
 o = response.getOutputStream();
 System.out.println("st-8 "+o);
 %>
 <table><tr><td align='left'>
 <img src=<%o.write(brr); %> width="117" height="160"
 >
  </td></tr></table>
  <%
 out.println("<br>");
 System.out.println("st-9 ");
 }
} catch (Exception e) {
out.println("Unable To Display image");
out.println("Image Display Error=" + e.getMessage());
return;
} 
%>
</div></td></tr></table></td></tr>
</table>
</body>
</html>

Advertisement
View Answers

Related Tutorials/Questions & Answers:
How to display multiple images in jsp
How to display multiple images in jsp  <%@ page import="java.io....()); System.out.println("st-7 "+brr); // display the image response.setContentType("image... "); } } catch (Exception e) { out.println("Unable To Display image"); out.println
how to display multiple images on browser
how to display multiple images on browser  i want to display multiple images on brower including string values from sql database using jsp
Advertisements
how to display multiple images on browser
how to display multiple images on browser  i want to display multiple images on brower including string values from sql database using jsp
How to store multiple images in folder and images path in database at a time using jsp?
How to store multiple images in folder and images path in database at a time using jsp?  I wanna browse multiple images in one form and store them in one folder and their path into datrabase
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project using this jsp,but i want to CollegeAction class and CollegeForm class how to do
display multiple images from postgres database in jframe
display multiple images from postgres database in jframe  i just want to display multiple images on jframe by firing a query on postgres database
Display Multiple Images in jscrollpane using Java Jpanel
Display Multiple Images in jscrollpane using Java Jpanel  Browse and Display multiple images in vertical view of java jscrollpane using jpanel
How to display images in jsp ffrom sqlserver2000 - JSP-Servlet
How to display images in jsp ffrom sqlserver2000   These code u sent is till not displaying the image in jsp from sqlserver2000. what table... for more information. http://www.roseindia.net/jsp/ Thanks
how to scroll multiple images using on Click in Android
how to scroll multiple images using on Click in Android  I am new... there is requirement like multiple image scrolling dynamically. But unfortunately i am unable to scroll multiple images. But i am able to scroll single image. plz let me know
display records with images problem - JSP-Servlet
, Display images from database to visit ... http://www.roseindia.net/jsp...display records with images problem  hello, i am developing HR... with a unique id. Also i wrote i jsp that link to servlet in order to display
how to upload and download images using buttons in jsp?
how to upload and download images using buttons in jsp?  how to upload and download images using buttons in jsp
how to save images in oracle using JSP
how to save images in oracle using JSP  how to insert images in oracle using jsp
how to save images in oracle using JSP
how to save images in oracle using JSP  how to insert images in oracle using jsp
how to retrieve images from database to jsp?
how to retrieve images from database to jsp?  Hi sir,i want to stores images along with the name and price with database and retrieve it on jsp.and... display the elaborated image in th next page.plz help me in coding.its vey
jsp images
jsp images  hi I had done a demo application using jsp. And i tried to display some images which is located in the server folder. It has done by using the IP address path of that image folder.. It has been success full in IE
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array
how insert multiple images in mysql database with use of struts 1.3.8 or java... ,with struts 1.3.8 and i want to insert multiple images in mysql database ,with use of struts 1.3.8 ,or with the help of Array methods ,like google multiple
pint multiple images from blob database
pint multiple images from blob database  How to display multiple images using blob from mysql database. The program code is as below: <TABLE cellpadding="15" border="1" style="background-color: #ffffcc;"> <
how to display the email message in jsp
how to display the email message in jsp  hi every one .. i am new from this industry please help me to display the email message in jsp page please send me sample code
How to pass multiple values from a servlet to JSP?
How to pass multiple values from a servlet to JSP?  hi, I want to pass multiple values form a servlet to JSP. Hw do i do that? I am able to send one value at a time without any prb, but I am unable to carry multiple (from two
How to carry multiple values from a Servlet to a JSP?
How to carry multiple values from a Servlet to a JSP?  By using the below code I am able to carry the username to a JSP (single value... needs to be carried from my servlet to a JSP. How do I do
how to send mail with multiple attachments in jsp
how to send mail with multiple attachments in jsp  how to send mail with multiple attachments in java script
Problem with display of images in applets - Applet
Problem with display of images in applets  Hi all, When I run this program, the appletviewer window is showing no output (i.e. no image). I'm..., this); } } --------------------------------------- Display image in Java Applet
how to display data from database in jsp
how to display data from database in jsp  how to display data from database in jsp
Blob images - JSP-Servlet
Blob images  Hi sir how can i retrieve blob images from database using jsp from mysql  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/retrieve-image.shtml Hope that it will be helpful
regarding images in jsp
regarding images in jsp  Hi, When I am trying to display an image in jsp, i am getting the image of bar charts in webroots/jspchart/web/jspbarchart.jsp.. But actually I am not getting any image in the browser.. Can any one help
upload images - JSP-Servlet
upload images  How to write the jsp code to upload images into database.   Hi Friend, The link we have provided you will allow you...://www.roseindia.net/jsp/upload-insert-csv.shtml Thanks
How to Display jrxml file on JSP page???
How to Display jrxml file on JSP page???  I made jrxml file using jasper report but how to display on jsp page?? i tried lot but still i didnt find out solution.so pls help me as soon as possible
how to display one image on jsp through java
how to display one image on jsp through java  Hi, I wanted to display one image on my jsp file like social networking sites. But the scenario...://upload/image.jpg . what is the procedure to get that and display on my jsp page
how to display selected checkboxes dynamically using jsp
how to display selected checkboxes dynamically using jsp  Hi friends i have a requirement that : in my JSP page i have radio buttons followed by the DB fields..when i click SUBMIT button,if the field(or record
How to display jfreechart at specified place in jsp
How to display jfreechart at specified place in jsp  I have a jsp page where i need to display the chart at specified position... of the jsp page is not displaying.... Below is my code. DefaultPieDataset
Displaying images - JDBC
Displaying images  How to display multiple images on a single jsp from MySql database
Displaying images - JDBC
Displaying images  How to display multiple images on a single jsp from MySql database
how display jsp frame - Java Beginners
how display jsp frame  Hi all, I am creating two jsp in frame... 1)In the code, you have provided,we have created another jsp 'new.jsp' in order to open the link on this jsp frame.It is having no code. Jsp Frameset
Animating Images in Java Application
Animating Images in Java Application       This section shows you how to create an animation with multiple images. You can see how animation has been implemented in the following
how to upload multiple files in jsp and saving the path in database and the file in folder
how to upload multiple files in jsp and saving the path in database and the file in folder  how to upload multiple files in jsp and saving the path in database and the file in folder I have created a form for the upload of files
how to display the excel file content in the jsp
how to display the excel file content in the jsp  How to present the content of the newly created excel file in the following jsp to the web browser: print("code sample"); <%@ page import="java.io.InputStream" %>
how to display data in List Or grid or in table in Jsp
how to display data in List Or grid or in table in Jsp   <%@page...(); } %> </body> </html> this is my jsp code i want to display...;JSP Reading Text File</title> </head> <body> <
how to space images in html code
how to space images in html code  how to space images in html code
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?  HELLO SIR, CAN ANYONE HELP ME OUT HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML... HELP ME OUT WITH HOW TO VIEW THE STORED DATA IN XML FILE USING EMPNAME. PLEASE
how to display data from jsp file into database
how to display data from jsp file into database  this is a jsp file . look at the line with code-> Statement st=con.createStatement(); in the below example. the error is "cannot convert from java.sql.Statement
all sequences to create jdbc and how can i use jtable to display a single columns or multiple columns
all sequences to create jdbc and how can i use jtable to display a single columns or multiple columns  i am 3rd year cs student in ethiopia. i have a view in my database schema so how can i create a jtable to look the view result
how to display or retrive an image in jsp whose path is stored in oracle database
how to display or retrive an image in jsp whose path is stored in oracle database  how to display or retrive an image in jsp whose path is stored in oracle database and the image is stored in my pictures folder
Advertisements
 

 

 

DMCA.com