Ganesh: Try something like this: response.setHeader("Content-Disposition", "inline;filename=myfilename.xyz");
I believe if the extension ("xyz") is "unknown" then a "file save as" dialog will always occur. Also, and I mean this in the kindliest way, maybe you should be a bit more careful when you write to this list. Words like "Now i require that feature." or "pls let me know the solution asap." irritate people because this list is *entirely* made up of volunteers who have "regular" jobs and other things they have to do. Again, no harshness intended, just thought you may like to know this for the future.. Regards, and good luck.. Geeta > -----Original Message----- > From: ganesh gadi [mailto:[EMAIL PROTECTED] > Sent: Friday, July 16, 2004 4:52 AM > To: [EMAIL PROTECTED] > Subject: How to Disable "open" button on "File Download" dialogue > box....please urgent > > > Hi Friends, > > i'm very happy to tell u my problems and get answers. > > i need a solution how to disable "open" button on > "File Download" dialog box.i want control on it. > Pls don't say no solution.Bcox i saw that type of > dialogue box...Now i require that feature. > pls let me know the solution asap. > > I used the following code to appear "File Download > box" > > httpServletResponse.setContentLength((int) f.length)); > > httpServletResponse.setContentType(mimeType); > > httpServletResponse.setHeader("Content-Disposition","attachmen > t;filename="+f.getName()); > > os =httpServletResponse.getOutputStream(); > stream = new FileInputStream(f); > bis = new BufferedInputStream(stream); > is = new BufferedInputStream(bis); > int count; > byte buf[] = new byte[4096]; > while ((count = is.read(buf)) > -1) > os.write(buf, 0, count); > > > i'm using > tomcat 5.0.19 > Struts 1.1 > IE 6.0 > Windows 2000server > > Thanks > Ganesh > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail Address AutoComplete - You start. We finish. > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]