Here is the JSP code: <html> <body> <form name="delete" action="download" method="post" > <table> <tr> <td> <IMG src="<%=request.getContextPath() %>/DisableText"> // DisableText is the servlet class name </td> </tr> </table> </form> </body> </html>
Probably you should make sure that the file you are reading is indeed a jpeg file. One of the simple ways to test this is to write the bytes to a file and try reading it using the browser / image viewer program. Normally, even if the image file extension is incorrect or invalid, 'Windows image and fax viewer' should be able to render the file if it's a valid image file, whereas if the extension does not match the actual file type, Internet explorer will not render the image, but just display a cross.
Joined: May 10, 2005
Size of the image is aroung 150KB op : It is an outputstream which i useed earlier but now i am not using it.. so op.flush(), op.close() doesn't have any significance.