Note that there are some explanatory texts on larger screens.

plurals
  1. POExcel tries to open file for download in IE
    primarykey
    data
    text
    <p>I have somewhat of an obscure problem, but I will try my best to explain.</p> <p>We have URLs mapped using SpringMVC so that when a POST request is made, a download can be triggered. For example, a request of</p> <pre><code>POST /request/bobby.html {POST variables:id=5} </code></pre> <p>will trigger a download of a CSV file related to id 5. The issue is that in IE, doing this gives you the option of Open or Save As. Choosing Open will open the CSV file as intended in MS Excel, but the temporary file will be named bobby.html. When the user leaves Excel open and tries to load another id (say, 6), focus will change to Excel, but since the request still points at bobby.html, the file is not refreshed. You have to close the file in Excel before a new one of the same name can take its place, but there is no message to tell the user to close the old file.</p> <p>Ideally, I want the file name to change, but the Spring servlet being used is mapped specifically to *.html files only because we have other applications running in the same container with other extensions.</p> <p>I have tried adding a UUID onto the request just to make it look different to Excel/IE, and it worked to some extent...</p> <pre><code>POST /request/bobby.html?uuid=&lt;uuid&gt; {POST variables:id=6} </code></pre> <p>made it look different to IE, but Excel still kept the base request as the file name. This allowed for a warning, but telling the user that their file name is "bobby.html" and they can't open another one might be more confusing than no warning at all.</p> <p>I also tried to add on something at the end:</p> <pre><code>POST /request/bobby.html/&lt;uuid&gt; {POST variables:id=6} </code></pre> <p>Any idea how to make this work? I know this type of thing is doable in SpringMVC, but with the servlet mappings is there a way to make it work?</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload