I'm trying to figure out how to set the filename in the following:
String path = "/usr/local/jakarta-tomcat-4.1.29/webapps/myapp/my_images.zip";
response.setContentType("application/octet-stream");
response.setHeader("Content-disposition","attachment; filename=" +path);
The file that I'd like the user to download is called my_images.zip. It resides here: /usr/local/jakarta-tomcat-4.1.29/webapps/myapp/my_images.zip
However, when I run the servlet, it pops up a dialog box with this as the filename:
usrlocal_jakarta-tomcat-4.1.29_webapps_myapp_my_images.zip
It's replaced the slashes with underscores. What's going on? The zip file resides in the root folder of my app. The servlet is in a subfolder called "fpauto".