title: unable to display all info from the database through jsp
body: <p>My requirement is to insert artist details and his picture through jsp into oracle database and retrieve back information and picture through another jsp program.</p>
  
  <p>artist table has five columns, four are varchar2 and fifth column is blob type.</p>
  
  <p>I have successfully inserted and successfully able to retrieve but the problem it displays only image. Below is the code. I am stuck. I need help. Please suggest me.</p>
  
  <pre><code>            PreparedStatement ps=con.prepareStatement("select * from artist");
              ResultSet rs=ps.executeQuery();
              while(rs.next()){ %&gt;
              &lt;table&gt;&lt;tr&gt;&lt;th&gt;artist fast name:&lt;/th&gt;&lt;td&gt;&lt;%=rs.getString(1) %&gt;&lt;/td&gt;&lt;/tr&gt; 
                  &lt;tr&gt;&lt;th&gt;artist middle name:&lt;/th&gt;&lt;td&gt;&lt;%=rs.getString(2) %&gt;&lt;/td&gt;&lt;/tr&gt;
                  &lt;tr&gt;&lt;th&gt;artist last name&lt;/th&gt;&lt;td&gt;&lt;%=rs.getString(3) %&gt;&lt;/td&gt;&lt;/tr&gt;
                  &lt;tr&gt;&lt;th&gt;artist job&lt;/th&gt;&lt;td&gt;&lt;%=rs.getString(4) %&gt;&lt;/td&gt;&lt;/tr&gt;
                  &lt;tr&gt;&lt;th&gt;artist image&lt;/th&gt;&lt;td&gt;&lt;img src="
              &lt;%
                  Blob bl=rs.getBlob(5);
                  byte[] image=bl.getBytes(1, (int)bl.length());
                  response.setContentType("image/jpeg");
                  OutputStream o = response.getOutputStream();
                  o.write(image);
                  o.flush();
                  o.close();
           }
              %&gt;" height="100" width="100" alt="bye"/&gt; &lt;/td&gt;&lt;/tr&gt;
              &lt;/table&gt; 
                  &lt;%
             con.close();
  </code></pre>