Firefox porpose to download my JSP files !

Hi guys,
I have a jsp web application that propose to the client to download the file .jsp instead of "opening" the file in the client.
It does not happen all the time, and I tried several things, but the problem is still around.
Any help will be greatly appreciated. I can't be the only one to have such a problem ???
Best

I found this in another forum, so I am not the only one with this problem, which is a good start !
See below :
Sean wrote:
Hi all,
I have made a web application with JSPs. It seems to work fine with IE.
However, with Mozilla and Firefox, it displays the HTML source
generated by JSP instead of actually showing the HTML page for that
source.
I'm stumped because I haven't found any other msgs on forums with
someone experiencing the same problem. Any help would be appreciated. I
need to fix this urgently.
Thanks
regards
Duke
P.S. It was suggested by someone on another forum that I should check
</head> tag. I have already done that and the HTML code is error free
(or so it seems).
You should show your JSP code, especially start of it.
May be you don't show that this is text/html ???
I am working with JSP for FireFox all the time - it works OK. But my JSP pages start like this:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
May be you skipped such headers?I am confident that I will solve this problem

Similar Messages

  • Firefox insists on downloading a zip file with an application. Options is set to ask for download loaction but does not work

    When downloading a ZIP file I get a 'Launch Application' window.
    In Options I have set download to ask for a location and use the download window but this does not work.
    cannot find any way of changing this and there is no option for using an application.
    If I down load in IE I have no problems so it must be FireFox and not a system problem.

    I have found the problem.
    A download manager had been installed for a specific website and it was butting in all the time. Even after removing it with 'Add or remove software' it still had its hooks into the system and it was impossible to download anything as it now would not run.
    Had to do an XP 'System restore' before I could get rid of it.
    The offending program was MD_setup.exe size 3,045KB from the themediadownloader.com

  • Firefox will not download any application, file, or picture. What will fix this?

    Hello all. Recently Firefox has stopped downloading anything. When I click "DL" , "Save As" , "Save", or "Run". The download window pops up and nothing happens. I've read through all the articles and did the troubleshooting and nothing works. Any other recommendations other then what is already listed on the forums?

    You have the Zoom Downloader extension.
    Did you check if that extension or possible another extension isn't the cause of your issue?
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Firefox won't download a zip file

    There is a chat board that I belong to and they posted a zip file. It looks like a white piece of paper with a folded over corner and says zip on it. When I put my cursor over it, it kind of blows up and then says at the bottom the file name then file.Zip 260K, but I can't click on it to get it to download, save, open, reject, nothing.
    I believe I have downloaded zip files in past but for some reason can't download this one.
    Can someone help please.
    I am running a Toshiba laptop with windows 7 service pack 1
    Application Basics
    Name: Firefox
    Version: 25.0
    User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
    Extensions
    Name: ModPlugin
    Version: 1.0.1159
    Enabled: true
    ID: {31d88f70-c791-42d8-8187-faaf71d42f67}
    Name: AVG SafeGuard toolbar
    Version: 17.0.2.13
    Enabled: false
    ID: avg@toolbar
    Important Modified Preferences
    accessibility.typeaheadfind.flashBar: 0
    browser.cache.disk.capacity: 358400
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    browser.cache.disk.smart_size_cached_value: 358400
    browser.places.smartBookmarksVersion: 4
    browser.search.suggest.enabled: false
    browser.search.useDBForOrder: true
    browser.sessionstore.upgradeBackup.latestBuildID: 20131025151332
    browser.startup.homepage: google.com
    browser.startup.homepage_override.buildID: 20131025151332
    browser.startup.homepage_override.mstone: 25.0
    dom.mozApps.used: true
    dom.w3c_touch_events.expose: false
    extensions.lastAppVersion: 25.0
    gfx.direct3d.checkDX10: false
    gfx.direct3d.last_used_feature_level_idx: 1
    network.cookie.prefsMigrated: true
    network.protocol-handler.warn-external.dnupdate: false
    places.database.lastMaintenance: 1384482032
    places.history.expiration.transient_current_max_pages: 103914
    plugin.disable_full_page_plugin_for_types: application/pdf
    plugin.importedState: true
    plugin.state.npqtplugin: 2
    privacy.sanitize.migrateFx3Prefs: true
    security.mixed_content.block_active_content: false
    security.warn_viewing_mixed: false
    storage.vacuum.last.index: 0
    storage.vacuum.last.places.sqlite: 1384311247
    user.js Preferences
    Your profile folder contains a user.js file, which includes preferences that were not created by Firefox.
    Graphics
    Adapter Description: Mobile Intel(R) 4 Series Express Chipset Family
    Adapter Drivers: igdumd64 igd10umd64 igdumdx32 igd10umd32
    Adapter RAM: Unknown
    ClearType Parameters: Gamma: 2200 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 400
    Device ID: 0x2a42
    Direct2D Enabled: true
    DirectWrite Enabled: true (6.2.9200.16571)
    Driver Date: 8-25-2010
    Driver Version: 8.15.10.2202
    GPU #2 Active: false
    GPU Accelerated Windows: 1/1 Direct3D 10
    Vendor ID: 0x8086
    WebGL Renderer: Google Inc. -- ANGLE (Mobile Intel(R) 4 Series Express Chipset Family Direct3D9Ex vs_3_0 ps_3_0)
    windowLayerManagerRemote: false
    AzureCanvasBackend: direct2d
    AzureContentBackend: direct2d
    AzureFallbackCanvasBackend: cairo
    AzureSkiaAccelerated: 0
    JavaScript
    Incremental GC: true
    Accessibility
    Activated: false
    Prevent Accessibility: 0
    Library Versions
    NSPR
    Expected minimum version: 4.10.1
    Version in use: 4.10.1
    NSS
    Expected minimum version: 3.15.2 Basic ECC
    Version in use: 3.15.2 Basic ECC
    NSSSMIME
    Expected minimum version: 3.15.2 Basic ECC
    Version in use: 3.15.2 Basic ECC
    NSSSSL
    Expected minimum version: 3.15.2 Basic ECC
    Version in use: 3.15.2 Basic ECC
    NSSUTIL
    Expected minimum version: 3.15.2
    Version in use: 3.15.2

    Are there other similar downloads on the site that do work, such as images, Word documents, etc., or are they all broken the same way?
    I wasn't familiar with the ModPlugin extension. Does it operate on the site that has the problem? If so, could you test with the extension disabled? You can do that by restarting in Firefox's Safe Mode, or manually on the Add-ons page. Either:
    * Ctrl+Shift+a
    * orange Firefox button (or Tools menu) > Add-ons
    In the left column, click Extensions.
    If that extension is not relevant to the site that has the problem, or if the problem continues after disabling it, can you provide a link to the site so someone could check it out?

  • In a new session of firefox, the initial download of a file is slow

    In a new session of firefox, the first file downloaded on that session is slow to start. Almost like a pause before it bring up the where to save window. I have the "please ask me where to save" selected. Every subsequent download after the initial download, firefox brings up the where to save window quickly. Firefox 3.6.3.
    == This happened ==
    Every time Firefox opened

    The dialog you are referring to is a ''shell dialog''.
    The most likely reason for this to take a long time is that the default location is taking a long time to resolve, as can happen if it's a network location or if the default folder doesn't exist.
    To reset the download location, reset '''browser.download.dir''' in the advanced configuration interface:
    # Select Firefox's location bar (press CTRL+L or click it)
    # Type '''about:config''' and press enter
    # Click '''I'll be careful, I promise!'''
    # in the Filter box, type '''browser.download.dir'''
    # Right click the keyword.url preference below and choose '''Reset'''

  • Servlet downloads Excel file ok but also attempts Servlet & JSP files !!

    Hi,
    My Servlet code downloads a csv into Excel as required BUT it also attempts to download the JSP file (that calls the servlet) and the Servlet file as well.... How do I ensure that only the csv file is downloaded. I am using the following code.
    <servlet code>
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream out = res.getOutputStream ();
    res.setContentType( "application/vnd.ms-excel" );
    String report = req.getParameter("report");
    filename = report + user_id + ".csv";
    String fileURL = the url;
    res.setHeader("Cache-Control", "no-cache");
    res.setHeader("Content-disposition",
    "attachment; filename=" +
    report + ".csv" );
    BufferedInputStream bis = null;
    BufferedOutputStream bos = null;
    try
    URL url = new URL ( fileURL );
    bis = new BufferedInputStream(url.openStream());
    bos = new BufferedOutputStream(out);
    byte[] buff = new byte[2048];
    int bytesRead;
    while(-1 != (bytesRead = bis.read(buff, 0, buff.length)))
    bos.write(buff, 0, bytesRead);
    catch(final MalformedURLException e)
    System.out.println ( "MalformedURLException." );
    throw e;
    catch(final IOException e)
    System.out.println ( "IOException." );
    throw e;
    finally
    if (bis != null)
    bis.close();
    if (bos != null)
    bos.close();
    </servlet code>
    thanks in advance

    This problems exists whether I try IE4, IE5 or IE5.5.
    Netscape is not an option.
    The running order in this download is Servlet, JSP then Excel file !!! All I want is for the Excel (csv) file to be downloaded. I do not see any problem with the code, but obviously there is. Please help if you can.
    cheers for any solutions.

  • When trying to download a wmv file it opens in safari instead.

    I have a mac. I had an old version of firefox and upgraded to 3.6.8.
    with my old version of firefox, when I download a wmv file from a site it would ask were to save, no with 3.6 it opens the file in safari.

    Go to ''Edit'' -> ''Preferences''. If that option doesn't appear, it might be under ''Tools'' -> ''Options''. Once that window is open, click on ''Applications'' and scroll down to ''WMV'' or ''WMV Video'' or something along those lines. Click the text in the ''Action'' column once to select it, then again to open the dropdown list. Change it to ''Save File''.
    That should do it!

  • How to make the Open/Save dialogue download the text file instead of JSP

    I am currently coding on a JSP program, which searches the database and writes the resultset into a file on the server, and then allows the client to download this tab delimited text file onto their local machine. But I met a problem, when the default Open or Save dialogue appears, it shows that it's trying to download the running JSP file from my local host instead of the newly-created text file. Despite this, when I click OK to either Open or Save the file, a warning dialogue will appear saying: The explorer cann't download this file, it's unable to find this internet site or something like that. I get no error message from the server but I was always told that Javax.servlet.ServletException: getWriter() was already called. What does this mean?
    I guess maybe this is caused by the mix use of outputStreams in my program. I don't know if there is a way to directly read the resultset from the database and then send it through outputStream to the client. My solution is: first create a file on the server to hold the resultset, and then output this file to the client. I did all these in one JSP program: Create file on the server, search database, and then read file and output the contents to client. Is this correct? I attached my code, please feel free to correct any of my mistake? Thanks!
    //global.class is a class dealing with database connection
    <%@ page language="java" import="java.sql.*,java.util.*,java.math.*,java.io.*,ises.*,frmselection.*" %>
    <jsp:useBean id="global" scope="session" class="ises.Global" />
    />
    <!--start to process data-->
    <%
    //get query statement from the session
    String sQuery = "";
    if (session.getAttribute("sQuery")!=null && !(session.getAttribute("sQuery").toString()).equals(""))
    sQuery = session.getAttribute("sQuery").toString();
    String path = "c:/temp";
    String fileName = "temp.TXT";
    File file= null;
    FileOutputStream fo = null;
    PrintStream ps = null;
    try {
         file = new File(path,fileName);
         if(file.exists()) {
         file.delete();
         file.createNewFile();
         fo = new FileOutputStream(file);
         ps = new PrintStream(fo);
    }catch(IOException exp){
         System.out.println("IO Exception: " +exp.toString() );
    java.sql.ResultSet recResults     = null;
    java.sql.Statement STrecResults = null;
    STrecResults = global.getConnection().createStatement();
    recResults = STrecResults.executeQuery(sQuery);
    ResultSetMetaData meta = recResults.getMetaData();
    int columns = meta.getColumnCount();
    String [] tempColumnName = new String[columns];
    String [] ColumnName =null;
    int DisColumns = 0;
    int unDisCol = 0;
    String sLine = "";
    if(recResults.next()) {     //if_1
    for(int n=0;n<columns;n++) {
    String temp = meta.getColumnName(n+1);
    if(!temp.equals("PROJECTID")&&!temp.equals("BUILDINGID")&&!temp.equals("HAZMATPROFILEID")) {
    sLine = sLine + "'" + temp + "'" + " ";
    tempColumnName[DisColumns] = temp;
    DisColumns ++;
    ColumnName = new String[DisColumns];
    }else {
    unDisCol ++;
    }//end for
    for(int i=0;i<(columns-unDisCol);i++) {
    ColumnName[i] = tempColumnName;
    ps.println(sLine);
    do{
    sLine = "";
    for(int n=0;n<(columns-unDisCol);n++) {
    String tempColName = recResults.getString(ColumnName[n]);
    if(tempColName==null) {
    sLine = sLine + "" + " ";
    } else {
         sLine = sLine + "'"+tempColName+"'" + " ";
    ps.println(sLine);
    }while(recResults.next());
    }     //end if_1
    recResults.close();
    recResults = null;
    STrecResults.close();
    STrecResults = null;
    %>
    <!--end of processing data-->
    <!--start of download.jsp-->
    <%
    //set the content type to text
    response.setContentType ("plain/text");
    //set the header and also the Name by which user will be prompted to save
    response.setHeader ("Content-Disposition", "attachment;filename=temp.TXT");
    //Open an input stream to the file and post the file contents thru the servlet output stream to the client
    InputStream in = new FileInputStream(file);
    ServletOutputStream outs = response.getOutputStream();
    int bit = 256;
    try {
         while ((bit) >= 0) {
         bit = in.read();
    outs.write(bit);
    } catch (IOException ioe) {
    ioe.printStackTrace(System.out);
    outs.flush();
    outs.close();
    in.close();     
    %>
    <!--end of download -->

    Thanks. I believe something wrong with this statement
    in my program:
    You are correct there is something wrong with this statement. Seeing how you are doing this in a jsp, not really what they're made for but thats another topic, the output stream has already been called. When a jsp gets compiled it creates a few implicit objects, one of them being the outputstream out, and it does this by calling the response.getWriter(). getWriter or getOutputStream can only be called once, other wise you will get the exception you are experiencing. This is for both methods as well, seeing how the jsp compiles and calls getWriter means that you cannot call getOutputStream. Calling one makes the other throw the exception if called as well. As far as the filename problem in the browser goes I'm guessing that it's in IE. I've had some problems before when I had to send files to the browser through a servlet and remember having to set an inline attribute of some sort in the content-dis header inorder to get IE to see the real filename. The best way to solve this is to get the orielly file package and use that. It is very easy to use and understand and does all of this for you already. Plus it's free. Cant beat that.
    ServletOutputStream outs =
    response.getOutputStream();
    because I put a lot of printout statement within my
    code, and the program stops to print out exactly
    before the above statement. And then I get the
    following message, which repeats several times:
    ServletExec: caught exception -
    javax.servlet.ServletException: getWriter() was
    already called.

  • Firefox 4.01 downloads files but the downloads windows greys out the "Open" and "Open containing folder" options and I can't trace the files

    Three days ago I upgraded to Firefox 4.01. I downloaded several files that were ok. Yesterday and today I downloaded one powerpoint file and a an apple *.dmg file.
    On the Download window these two files I can see with the total mb in size. However when I right click the file list in the Download window the "Open" and "Open containing folder" options are greyed out. What is more I cannot find these files anywhere on my computer when I use Windows Explorer to search.
    It seems that this happened after I tried to download a Firefox add on from http://releases.mozilla.org/pub/mozilla.org/addons/64761/amazonassist-0.7.2.6-fx.xpi and my antivirus picked up the JS/Kryptik.AK trojan and terminated the connection. Is there a link with the problem I am experiencing?
    I use Windows 7 professional, Firefox 4.01

    You're welcome

  • When I try to download Firefox for Windows, it unzips the file and says it cannot find 7-Zip file and stops download

    I have windows 7 on a desktop. I had firefox before which worked fine then I attached a router to my computer that may have been defective and may have damaged the computer. I took the router off. Firefox suddenly reverted back to the start up page of when you are new to firefox, e.g. here's how it works, and stopped loading my normal home page. Even though I entered the tabs I wanted for my startup home page every time I shut down my computer it went back to the beginning thinking I had only just loaded it. I did lots of system diagnostics but nothing appeared to be wrong with my computer so I uninstalled Firefox, restarted, then downloaded it again. When I download it, it says run or save and I choose run. Then it extracts the file and a message comes up that says "7-Zip. Cannot find file. Then nothing more happens. No files are downloaded to my computer and it's as though I never tried to download it.

    SAVE the installer to your hard drive (do not use the "Run" option); save it to your Desktop so that you can find it. When the download is complete, close whatever browser you have open, click or double-click the file you downloaded and see if it installs without a problem.
    The downloader is a self-extracting archive and should not need or use 7-zip. I have 7-zip installed on my system and it does not interfere with nor is it used in the Firefox install process. Hopefully, you have not set the downloading of .exe files to be associated with 7-zip.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How do I stop firefox from pre-downloading a file during a file download prompt?

    I use DownThemAll as my download manager for files generally over 10MB, as my internet connection is generally too slow for firefox to download a file larger then this without firefox "finishing" a download before it's complete, corrupting the file. This never happens with DownThemAll.
    For some sites, either there is no download link to right click or it starts automatically, launching the download prompt. Firefox's internal download manager automatically starts downloading the file (not visibly, but in the background) before I can choose to use DownThemAll from the prompt instead.
    This wastes bandwidth. Even worse, some hosting sites have randomly generated download gates for each session that expire after disconnection or limit you to a single download in a given time frame. This means that I effectively can't use DownThemAll on certain websites because firefox's own download manager steps in and gets in the way.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • SINCE INSTALLING I.E. 11 IN WINDOWS 7, UNABLE TO DOWNLOAD OR SAVE FILES IN FIREFOX; HOW DO I CORRECT THIS PROBLEM?

    This is what I wrote to the Microsoft Community seeking a correction of the issue (still no reply to my request for assistance with this matter from them):
    Can I go back to I.E. 10? Ever since I installed version 11, I've had an unstable desktop. It appears to have damaged the Windows Explorer interface in other browsers, such that when I open the popup window to save downloads and/or other files, all that shows up in the window are the "Save" and "Cancel" buttons, but it does not show the interface to choose where to save the file(s), thus I cannot save anything at all in those other browsers. I primarily use Firefox, and every time I want to save a file, I have to startup I.E. 11 to save anything and everything.
    I would much prefer going back to I.E. 10 which caused me no such problems; but, if I cannot go back to I.E. 10, how do I correct this issue so I can save files in other browsers? This situation has been going on for months now, and I've waited patiently thinking that there would be an update for Microsoft and/or Firefox (as well as Chrome and Safari) that would correct this problem by now; but, even though I have all of the latest updates and versions installed, no updates have corrected the issue at all. I would very much appreciate any help you can give.
    Oh, also, I have tried uninstalling Firefox completely at least twice, and rebooting before reinstalling it to the latest version, but that has not corrected the problem either. I additionally tried turning I.E. 11 off in Windows, and then tried running Firefox to see if the download interface would be restored, but it still had the very same issue(s) [no ability to choose the place to save files, and thus being completely unable to save any downloads and/or other files]. I can't believe that this problem has been going on for so long now without any update(s) resolution.

    The following is the latest that I've written to Microsoft about this entire matter:
    You're still not getting it. I've never had a problem with downloading and/or saving files in I.E.; and I very clearly explained to you guys that the problem is in the other browsers, but it's caused by a malfunction in the Windows Desktop.
    Why can't someone with English as their first language, please help me?
    But, regardless, just in case your recommendation(s) had anything to do with anything, and were perhaps creating the problem in the other browser (though I was pretty sure that it had nothing to do with my problem), I made I.E. the default browser; yet, of course, that did NOT correct the problem. Also, when I set I.E. as the default browser, the explorer.exe file crashed and restarted.
    Nevertheless, because I (wrongly) thought that I couldn't uninstall I.E. 11, because somehow I missed the listing for it in Windows Programs and Features, I went to the latter again and found I.E. 11 listed this time, and uninstalled it. After it completed, I rebooted the laptop. Then I went into Windows Update and looked for what version of I.E. it was then going to want me to update to since I.E. 11 was uninstalled.
    I saw that I.E. was taken all the way back to I.E. 8 and had updates for it as well as to update to I.E. 9, so I did the former updates first, rebooted, then updated to I.E. 9 and rebooted again. Then I ran Windows Update again checking for new updates, and found that there was a cumulative security update for I.E. 9, which I installed and then rebooted once again.
    Then, upon checking for new updates in Windows Update again, I found that the option(s) to update to I.E. 10 or 11 were now optional, which they weren't before, and then I updated to I.E. 10 and rebooted once more. Upon Windows restarting, I checked again for new Windows Updates and there were some security updates, so I installed them and restarted the laptop.
    This time upon rebooting, I checked Windows Update for further new updates and there were none; so I'm now completely updated to I.E. 10; but, because going back to I.E. 10 corrected some of the instability with the Windows Desktop, I am ignoring the optional update to I.E. 11, and I am NOT going to update to it again.
    Throughout the update process, upon restarting Windows, I kept starting Firefox to see if the "Save As" window then worked, but throughout the entire update process, as well as when I completed it, I still could not download or save files [because the window still doesn't show where to save the file(s)---please see the Print Screen copy of what it looks like, attached to this message (sorry, but I.E. won't let me browse for the file, and the tab or windows crashes and reloads every time when I click "Browse" to look for the file to attach)].
    So, I decided to try uninstalling Firefox for the fourth time, rebooting and reinstalling it, hoping that might correct he issue this time since I downgraded to I.E. 10, but the "Save As" window still looks the same, and I am still completely unable to save any files or downloads while in Firefox.
    Oh, I also tried resetting all of the Windows Folder Options again to default settings, and reset all of the folders, in case that had anything to do with the problem, but that still did NOT correct the issue either.
    I am now going to try creating a new user account also with Administrator privileges, changing Users, trying to run Firefox in it, and see if the problem with the "Save As" window is still an issue....
    In the new User profile, the situation is even worse. When I try to save any file(s) in Firefox, Firefox crashes (latest version).
    I wrote to Firefox a couple of days ago, but an arrogant "techie" is giving me the run around and is not helping me, and no else is helping with the matter so far.
    Postscript: Now Windows Explorer (the explorer.exe file) that runs the desktop crashed and restarted again twice while I was trying to print a file, and it appears that it won't let me print at all anymore.

  • How I can diable in firefox dialog box "download error could not be saved, because the source file could not be read. " when file not downloaded

    How I can diable in firefox dialog box "download error could not be saved, because the source file could not be read. " standart download manager when file not downloaded

    It is possible that anti-virus software is corrupting downloaded files or is interfering otherwise.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See:
    *http://kb.mozillazine.org/Unable_to_save_or_download_files
    You can try to set the browser.download.manager.scanWhenDone pref on the <b>about:config</b> page to false.
    *http://kb.mozillazine.org/about:config

  • Download a text file from JSP (Urgent Please!)

    Hi,
    I have a issue with this JSP, I need to download a txt file from my webserver to the pc client, the page shows the dialg box but appear the filename (list.jsp) of my jsp instead of the txt file.
    If I click the save buton save the list.jsp page; if I click in the open buton, then appear again the dialg box and now appear the url (download.jsp?filename=...) and if I click in the save button now I can save my txt file in the local pc.!!!!
    Any ideas ??
    list.jsp --> is the jsp from the download.jsp is run.
    download.jsp
    <%@ page import="java.io.*,javax.servlet.*,java.util.* "%><% String filename = request.getParameter("filename");
    response.setContentType("application/download");
    String value = "attachment; filename=\"" + filename + "\";" ;
    response.setHeader("Content-Disposition",value);
    int iRead;
    FileInputStream stream = null;
    try {
    File f = new File("C://test//" + filename);
    stream = new FileInputStream(f);
    while ((iRead = stream.read()) != -1) {
    out.write(iRead);
    out.flush();
    finally {
    if (stream != null) {
    stream.close();
    %>

    Maybe try no quotes around the content disposition header?
    Also, I'm not sure that application/download would be the best content type, maybe "application/octet-stream" instead. You should also probably explicitly set the Content-Length header to the file size.

  • FireFox 4 and earlier versions will not install on my Windows Vista, 64 bit computer. The file downloads and the file extracts but I never make it to the installation wizard.

    I have tried to download FireFox 4 and earlier versions from several different website, thinking the files might have gotten corrupted, and each time I download the file the exact same thing happens, the file downloads and the file gets extracted but when the extraction completes the small window dissappears and nothing else happens.
    My machine is a Windows Vista 64 bit system and I've tried downloading the file with my 32 and 64 bit Internet Explorer but nothing seems to work. Can someone help me please because I would love to be able to completely delete I.E.

    Hi, thanks for your Flash file info. Well you must have been doing it right, since all of your Flash files for IE and FF are correct.
    The SWF plugin for FF and the SWO for IE are also correct.
    You shouldn't be having any problems with Flash Player.
    What you can try is to turn off the hardware acceleration feature. Go to any video, like youtube and right click on the video and click on Settings. Display Settings is where you will UN check hardware acceleration.
    See if that helps. Let me know.
    Thanks,
    eidnolb

Maybe you are looking for

  • How to ichat between two computers with one .mac account

    My husband and I travel a lot separately and need to be able to ichat when one of us is away. We have an iMac at home, and an iBook on the road (both about a year old with the latest software updated). We tried using an AIM account on one and our .ma

  • Pdf content in other programs not working?

    I've tried searching, but was not able to find much, so apologies if this has been discussed already. Created an interactive pdf out of Indesign. Then, in Acrobat, added some web links around words, some around art. The links around text are underlin

  • Spacing between portlets

    Hi, I am new to portal and sorry if this is a silly question. How can I remove the spacing between the portlets? In fact, whenI design my pages, should I insert the page elements as JSP/HTML portlets, if so, I need to remove the spacing between them.

  • Action on Graph.

    Hi Friends, I am displaying some data in the a table and generating Graph of column type based on a value of a perticular column. Now my graph is coming correctly . Now i want some action on clicking on the graph . Lets say my graph having 3 column A

  • JOptionPane keeps popping up behind windows

    I'm having trouble with my JOptionPane popping up behind my main window, rather than in front. On the advise of someone more experienced than me, I encased the JOptionPane in a JDialog, as follows: Object[] array =         new JLabel("Enter some text