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
FW: IE converts file.jpg to file_jpg when saving
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-nameMywebapp/web-resource-name url-pattern/images/x.jpg/url-pattern http-methodGET/http-method /web-resource-collection auth-constraint role-nameuser/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/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]
extra directory when using webdav context
This seems a little bizaar. I have the /webdav context running without any problems. I have apache sitting infront of tomcat and am using namebased virtual hosts. I can open the site as a Web Folder (IE6) connecting to port 8080 (tomcat) and it works perfectly. If I connect to port 80 (apache), things work, but I get an extra directory which is called the same thing as the current directory. E.g. If I navigate into a directory x that has nothing in it (on the filesystem), the webdav client shows directory x. I can click on this directory and x shows up again, and so forth. I'm not sure if this is a problem with tomcat, apache, or the connector. Anyone experience this before? I can post config files if required. Note: versions are Apache 2.0.51, Tomcat 4.1.30 Cheers, Brad Brad Hafichuk Azus Technologies Inc. www.azus.net (403) 710-8079
Re: Tomcat 4.1.30 adding no-cache to http headers
I agree that that would work, but I'm not using any servlets to download the files, and thus have no where to place the code. I've basically just set up a folder, threw the word documents into it, and put a WEB-INF/web.xml (with security) in it as well. I was using apache's .htaccess before, but needed to move things to tomcat to use the single-signon. Any other solutions out there? Cheers, Brad - Original Message - From: Jon Wingfield [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, August 12, 2004 6:09 AM Subject: Re: Tomcat 4.1.30 adding no-cache to http headers Yep. Tomcat (reasonably) adds these headers when the requested url is within a security constraint defined within the web.xml. In all places on our site where pdf, excel, word docs etc can be downloaded we have the following code: final String userAgent = request.getHeader(user-agent); if (response.containsHeader(Pragma) userAgent!=null userAgent.toUpperCase().indexOf(MSIE)-1) { response.setHeader(Pragma, public); } This seems to have solved the issue for us. You could put the above code in a Filter mapped to your download urls in the members context. HTH, Jon Brad Hafichuk wrote: The problem I'm facing is that I have MSWord (*.doc) files in a webapp that required basic auth to access. The problem I've come across is that when downloading (viewing) the files in IE, word can't find the file (it's not cached http://support.microsoft.com/?kbid=317208). I've checked out the headers using wget and it looks like tomcat is adding the Pragma and Cache-Control headers (which causes the IE problem). Note that I'm running apache infront of tomcat. [EMAIL PROTECTED] PVIMS]# wget -S http://username:[EMAIL PROTECTED]/members/acclaim/PVIMS/S ection 10.doc --15:49:58-- http://username:[EMAIL PROTECTED]/members/acclaim/PVIMS/Section%2010.doc = `Section 10.doc.5' Resolving www.nationalengineering.ca... 142.59.91.190 Connecting to www.nationalengineering.ca[142.59.91.190]:80... connected. HTTP request sent, awaiting response... 1 HTTP/1.1 200 OK 2 Date: Wed, 11 Aug 2004 21:44:17 GMT 3 Server: Apache/2.0.50 (Fedora) 4 Pragma: No-cache 5 Cache-Control: no-cache 6 Expires: Thu, 01 Jan 1970 00:00:00 GMT 7 Set-Cookie: JSESSIONIDSSO=74C58A3FE66679CF322FE867EE6469CC; Path=/ 8 Set-Cookie: JSESSIONID=48B55A59C96C5DA1BDBE5CA6D781FF88; Path=/members 9 ETag: W/41984-1092171072000 10 Last-Modified: Tue, 10 Aug 2004 20:51:12 GMT 11 Content-Type: application/msword 12 Content-Length: 41984 13 Connection: close 100%[=== ==] 41,984--.--K/s 15:49:58 (1.37 MB/s) - `Section 10.doc.5' saved [41984/41984] Is there anyway I can remove these headers for the /members context. I'm basically using tomcat in place of Apache's .htaccess files, since I need to use tomcat's single-signon for other *real* applications. Thanks, Brad Brad Hafichuk Azus Technologies Inc. www.azus.net (403) 710-8079 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.30 adding no-cache to http headers
The problem I'm facing is that I have MSWord (*.doc) files in a webapp that required basic auth to access. The problem I've come across is that when downloading (viewing) the files in IE, word can't find the file (it's not cached http://support.microsoft.com/?kbid=317208). I've checked out the headers using wget and it looks like tomcat is adding the Pragma and Cache-Control headers (which causes the IE problem). Note that I'm running apache infront of tomcat. [EMAIL PROTECTED] PVIMS]# wget -S http://username:[EMAIL PROTECTED]/members/acclaim/PVIMS/Section 10.doc --15:49:58-- http://username:[EMAIL PROTECTED]/members/acclaim/PVIMS/Section%2010.doc = `Section 10.doc.5' Resolving www.nationalengineering.ca... 142.59.91.190 Connecting to www.nationalengineering.ca[142.59.91.190]:80... connected. HTTP request sent, awaiting response... 1 HTTP/1.1 200 OK 2 Date: Wed, 11 Aug 2004 21:44:17 GMT 3 Server: Apache/2.0.50 (Fedora) 4 Pragma: No-cache 5 Cache-Control: no-cache 6 Expires: Thu, 01 Jan 1970 00:00:00 GMT 7 Set-Cookie: JSESSIONIDSSO=74C58A3FE66679CF322FE867EE6469CC; Path=/ 8 Set-Cookie: JSESSIONID=48B55A59C96C5DA1BDBE5CA6D781FF88; Path=/members 9 ETag: W/41984-1092171072000 10 Last-Modified: Tue, 10 Aug 2004 20:51:12 GMT 11 Content-Type: application/msword 12 Content-Length: 41984 13 Connection: close 100%[=] 41,984--.--K/s 15:49:58 (1.37 MB/s) - `Section 10.doc.5' saved [41984/41984] Is there anyway I can remove these headers for the /members context. I'm basically using tomcat in place of Apache's .htaccess files, since I need to use tomcat's single-signon for other *real* applications. Thanks, Brad Brad Hafichuk Azus Technologies Inc. www.azus.net (403) 710-8079
When will the JK2 connector be available for Fedora AMD64?
Just wondering if someone is working on the JK2 connector for Fedora Core 1 x86_64 (AMD64). If someone is and needs a test site, let me know. Cheers, Brad
mod_jk.so for Fedora Core 1 x86_64
I've been trying to find a mod_jk.so binary to connect Apache 2.0.48 to Tomcat 4.1.29 on my AMD64 server, which is running Fedora Core 1 x86_64. I've noticed that FreeBSD has a 64 bit version, any idea if someone is working on one for Fedora? Cheers, Brad
Re: mod_jk.so for Fedora Core 1 x86_64
Are you telling me that the i386 version will work on a 64bit processor? -Brad - Original Message - From: Lohan Spies [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, May 13, 2004 8:28 AM Subject: RE: mod_jk.so for Fedora Core 1 x86_64 http://apache.is.co.za/dist/jakarta/tomcat-connectors/jk2/binaries/linux/ here is the link -Original Message- From: Lohan Spies [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:28 PM To: 'Tomcat Users List' Subject: RE: mod_jk.so for Fedora Core 1 x86_64 There is an already build binary on the Jakarta.tomcat site! Just go to binaries and search around! It is a jk2 binary The package works, I installed it! -Original Message- From: Brad Hafichuk [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:22 PM To: [EMAIL PROTECTED] Subject: mod_jk.so for Fedora Core 1 x86_64 I've been trying to find a mod_jk.so binary to connect Apache 2.0.48 to Tomcat 4.1.29 on my AMD64 server, which is running Fedora Core 1 x86_64. I've noticed that FreeBSD has a 64 bit version, any idea if someone is working on one for Fedora? Cheers, Brad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk.so for Fedora Core 1 x86_64
btw, I did try the i386 version without any luck. Anyone else know of any solution... -Brad - Original Message - From: Lohan Spies [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, May 13, 2004 8:55 AM Subject: RE: mod_jk.so for Fedora Core 1 x86_64 Sorry didn't see you were using 64 bit. Just saw tomcat and fedora! I don't know give it a bash -Original Message- From: Brad Hafichuk [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:43 PM To: Tomcat Users List Subject: Re: mod_jk.so for Fedora Core 1 x86_64 Are you telling me that the i386 version will work on a 64bit processor? -Brad - Original Message - From: Lohan Spies [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, May 13, 2004 8:28 AM Subject: RE: mod_jk.so for Fedora Core 1 x86_64 http://apache.is.co.za/dist/jakarta/tomcat-connectors/jk2/binaries/linux/ here is the link -Original Message- From: Lohan Spies [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:28 PM To: 'Tomcat Users List' Subject: RE: mod_jk.so for Fedora Core 1 x86_64 There is an already build binary on the Jakarta.tomcat site! Just go to binaries and search around! It is a jk2 binary The package works, I installed it! -Original Message- From: Brad Hafichuk [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:22 PM To: [EMAIL PROTECTED] Subject: mod_jk.so for Fedora Core 1 x86_64 I've been trying to find a mod_jk.so binary to connect Apache 2.0.48 to Tomcat 4.1.29 on my AMD64 server, which is running Fedora Core 1 x86_64. I've noticed that FreeBSD has a 64 bit version, any idea if someone is working on one for Fedora? Cheers, Brad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]