IE6 generated strange worksheet name when doing export from java application

I am encountering error like

test(10)[1].csv file cannot be found at 
C:\Documents and Settings\Ron\Local Settings\Temporary Internet Files\Content.IE5\PQ0STUVW

When trying to do export of CSV file using the following codes. Anyone have any idea what could be wrong? This issue does not occur in IE7 / Firefox and is only specific to IE6.

response.setHeader("Content-Disposition", "attachment;filename=" + fileFullName);

Asked by: John202 | Posted: 23-01-2022

Answer 1

I've already got that problem and asked the question that as a correct answer (or, shall I say, a good workaround for IE).

Answered by: Eric860 | Posted: 24-02-2022

Answer 2

Are there "special" characters in your "fileFullName"? You cold also try to check the length of your file name, I once had an issue with IE6 when the file name got too long.

Just to be on the safe side: your "fileFullName" only contains the name of the file and not the path, right?

Answered by: Chloe285 | Posted: 24-02-2022

Answer 3

I'm not sure exactly why the filename is getting munged, but the 'not found' in IE usually means that you're also setting no-cache headers, or a cache time of zero seconds.

If I remember correctly, IE can't open the file directly - it has to cache it first, and then open it from the cache. So you have to allow it to be cached.

This means that: 1. For things to work properly, the file name needs to be unique each time - I usually add the timestamp (to the millisecond) to the filename.

  1. So as to keep your clients' caches from growing unnecessarily, you should probably set the cache time to something short (1 or 2 seconds or so), but definitely not 0;

Answered by: Alfred217 | Posted: 24-02-2022

Similar questions

logging - email log file, generated by Java WebLogic Application Server

does this requirement conform to the J2EE Standards? is there a easy way to implement this, log file gets generated by Log4J and in the end I will access the file system and email the whole file(s). can I access the file system?

memory leaks - Java Crashed application - how to read crash file generated by JVM?

I have java aplication and it started to crash sudently, without no exception. But sometimes JVM creates crash log file, which has name like: "hs_err_pid10930.log". Can anybody read it and tell me what is wrong? I am not able to find out what si wrong. The only reasonable info which I find here is that swap size is 0. I that a problem? How could it occure? You can find the file here:

How is it possible for JVM to run generated machine code from a Java application via JIT?

How is it possible that JVM compiles bytecode into native code dynamically and then executes it? I can imagine that it is possible to write data values into memory but if I remember correctly, a program can't write to the memory that contains instructions (otherwise viruses could use this feature and proliferate quickly).

Java Web application, how to let a client save a generated .txt file?

I have a JSF Web application, and at some point i present the client a big chunk of information, I want to have a save as link, that allows the client to save this information on his computer as a .txt file. Information on how to achieve this or a good tutorial would be great.

java - Selenium :- In my application there is button whose id is getting randomly generated, How to locate that button

In my web application there are 5 buttons in the page which having the same title, name and the id is getting generated randomly, How to click on the particular button,which properties can i use, so thats its work fine in IE.

java - Generated QR image disappers once i exit the application

Recently am being playing around with qr code generation, and after alot of google and help from stack overflow members i was successfully able to generated it, using google API. but when i click "back" button in the emulator and when i again click theapplication the qr code image disappears?? how to make it stay permanent until i click the "generate" button again for a new Qr image?? here is the co...

java - Where do I put application generated HTML reports to that they don't get removed when I deploy a new WAR file?

I have a simple web application which lets the user upload local user data and then they can generate HTML reports from that uploaded data. Once the HTML is generated, I display a link to the report which they can click on to view in their browser or they can share the link with others. The problem is that I am currently putting the "/Upload" folder in the "WEB-INF" folder because I don't want that folder data acc...

java - NetBeans Platform Application - change Icon generated by Installer

I developed an NetBeans Platform Application and generated a Windows installer. When I install the application I have the following Icon on the desktop: Where do I change the icon in the settings of the project? In the branding of my NetBeans project, I changed all 3 application icons to my icon, but still I end up with the o...

jsp - Where to store classes generated at runtime in a java web application?

I've created a project that dynamically writes, compiles and instantiates a new java class at runtime and it works just fine when I run this on the command line or within eclipse. Ultimately my goal is to create a technology very similar to JSP; the user provides a "template" file and I translate it into a java class and instantiate that class. My problem is that I can't seem to instantiate the newly compiled class whe...

java - Database schema is not generated in a EAR Application

I have this scenario in a EAR application which have the following structure: Project data ear entity META-INF persistence.xml business web At the entity folder there is all the entity classes and a persistence.xml with the property setted to create. Whe...

c# - Embedding Flash Player in a C++ or Java application?

I would like to embed Flash Player directly inside a C++ or Java application. I found an article that describes how to do this for C#: Unfortunately, I have no experience with C#, COM or ActiveX. I need someone to translate this code to C++, allowing ...

java - How best to implement user selectable variables in web application

I have a Java based web-application and a new requirement to allow Users to place variables into text fields that are replaced when a document or other output is produced. How have others gone about this? I was thinking of having a pre-defined set of variables such as : @BOOKING_NUMBER@ @INVOICE_NUMBER@ Then when a user enters some text they can specify a variable inline ...

java - BIRT in a desktop application

Did someone ever used a BIRT report in a desktop application. I'm comming from the .NET environment and there you can use Crystal Reports to show reports in desktop apps. Is this possible with BIRT too, without having to set up a server environment? Can you give me some advice how to reach this goal? Thanks in advance.

which library better for faster java application swt or swing?

which library better for faster java application swt or swing?

java - Which is the best Open source application server?

java - Access spring bean that is exposed using http invoker from GWT application

Can I access spring bean that exposed using http invoker (server) from GWT application (client)? If so is there any example / tutorial for that?

How to close a Java Swing application from the code

What is the proper way to terminate a Swing application from the code, and what are the pitfalls? I'd tried to close my application automatically after a timer fires. But just calling dispose() on the JFrame didn't do the trick - the window vanished but the application did not terminate. However when closing the window with the close button, the application does terminate. What should I do...

java - How best can I isolate my application from an unreliable database?

I have a Java SOAP data service which sits on top of a Sybase database which, for reasons out of my control, has unreliable performance. The database is part of a vendor package which has been modified by an internal team and most of the issues are caused by slow response times at certain times of the day. The SOAP service provides data to a calculation grid and when I request data, I need the response time to be ...

java - Netbeans GUI Designer & Fixed-Size Application Panels

I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size. When I start a new GUI project in NetBeans, I set the properties of the main panel for min/max/preferred size to 800 x 600, and the panel within the 'Design' view changes size. ...

How do I create a "Hello World" application in java for an iphone?

I'd like to create a basic "Hello World" style application for the IPhone using Java - can anyone tell me how?

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)