Update.

I've found something interesting out.

If I attempt to download a file (say,
http://www.example.com/mywebapp/images/x.jpg) without any security
constraint in the web.xml file, I can correctly get the filename to show up
in the save as drop down for both IE and Mozilla (right-click on picture,
save as...).

If I use a security constraint;

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>Mywebapp</web-resource-name>
      <url-pattern>/images/x.jpg</url-pattern>
      <http-method>GET</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>user</role-name>
    </auth-constraint>
    <user-data-constraint>
      <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
  </security-constraint>

then right-click on the image, IE will display the image as untitled.bmp,
even though the image IS being displayed in the browser.

Why would the change in the security policy cause this to happen? Am I
setting the security-constraint correctly?

Thanks for any help you guys can offer.

Cheers,
Brad

-----Original Message-----
From: Brad Hafichuk [mailto:[EMAIL PROTECTED] 
Sent: February 7, 2005 1:08 PM
To: 'Tomcat Users List'
Subject: IE converts file.jpg to file_jpg when saving

This problem has been bugging me for at least 6 months. I finally noticed
that IE6 is converting the dot (".") in file.jpg to an underscore ("_").

Has anyone experienced this very odd behaviour before?

 

I should point out that I am sending the file back to the client via a
servlet, the process being.

 

Load file into memory (as bytes) and close fileinputstream

Get mimetype of file

Set responses mimetype

Set response content-disposition (header) to attachment and
filename=file.jpg

Get response OutputStream

Write loaded file (bytes) to outputstream

Flush and close outputstream

 

I can post the exact code if needed. I'm running Tomcat 4.1.30.

 

Cheers,

Brad

 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to