i devleoped code .i display the image file and pdf file displayed on the browser if i use internet explore. i use firefox ,just downloading. my code .please hlep to me. how display allfile formats on browser.give me source code. <%@ page language="java" %> <%@ page import="java.io.*"%>
One source of problems might be that you misspelled the Content-Disposition header value. It's called "attachment", not "attachement".
But if you want to display files in the browser you should use "inline" instead. Note that the user may have set the browser to not open certain file types, and save them to disk instead. There's nothing the web app can do about that.
Furthermore, streaming files from a JSP page is bound to cause problems, because JSPs are meant for outputting text, not binary data. You should use a servlet instead. [ May 21, 2008: Message edited by: Ulf Dittmer ]
Ping & DNS - updated with new look and Ping home screen widget