| Author |
Setting file extension
|
Aron Daburn
Ranch Hand
Joined: Mar 18, 2007
Posts: 36
|
|
I am needing to send a simple text file, but with a .license extension. My code is as follows: It is saving the file with .txt. I tried removing the response.setContentType and it saved it with .html. How do you set the extension on a file to .license?
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
MSIE is great at ignoring things like this. Did you try setting the content type to 'text/license'? If that doesn't work set the content type to something that the browser has never heard of like 'xxx/xxxx' and it will throw up a prompt saying that MSIE doesn't know what to do with this, Save or Open With?...
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Aron Daburn
Ranch Hand
Joined: Mar 18, 2007
Posts: 36
|
|
Yeah, I just tried setting its content type as the company name followed by '-license' and then that caused it to save it as a .license. Thanks
|
 |
 |
|
|
subject: Setting file extension
|
|
|