Hi Evans,   
           I want to display the images in browser from the database.
            I have added   my code.It throws null pointer Exception. 
            In my action, i have implements
ServletRequestAware,ServletResponseAware interface. I want to            
know if ServletOutputStream is working in Struts 2.0.6 action class.  
       Can u give a solution for this.   
                InputStream in = rs.getBinaryStream("filedata");       
       response.setContentType("image/jpeg");
   response.addHeader("Content-Disposition","inline;filename=" filename);
 ServletOutputStream out = response.getOutputStream();    
      out.flush();
int c;
 while ((c = in.read()) != -1) 
{
out.write(c);
}
in.close();
out.close();
-- 
View this message in context: 
http://www.nabble.com/Struts-2-File-upload-to-store-the-filedata-tf4948427.html#a14211550
Sent from the Struts - User mailing list archive at Nabble.com.

Reply via email to