Hi
Thanx every one for the ur reply, i found out the solution for the issue. Instead of displaying the image using the image tag, we can directly read the image file and write it to the output stream of the response object. Following is the code sample.
String mimiMappings[] = {"application/pdf pdf PDF", "application/msword
DOC doc"};
MimetypesFileTypeMap mimeType = new MimetypesFileTypeMap();
mimeType.addMimeTypes(mimiMappings);
response.setContentType(mimeType.getContentType(certImagePath));
InputStream certFile = new FileInputStream(new File("ImageFile.jpg"));
OutputStream respOutStream = response.getOutputStream();
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = certFile.read(buf)) > 0)
{
respOutStream.write(buf, 0, len);
}
certFile.close();
respOutStream.flush();
respOutStream.close();
Regards
Muthu