2010/1/4 Darren Salomons <[email protected]>: > > I'm using Tomcat 6.0.18 with apache 2.2.11. > > So this isn't a normal pass through of files from tomcat to apache. I > use a URL such as http://mydomain.com/servlet/stylesheet.css to execute > a servlet that would dynamically create the file "stylesheet.css". > Since my servlet excepts all types of file types I thought I would just > leverage apache setting the content-type for me. This only works > because apache is smart enough to pick up the extension on the response > url and append the correct mime type to the content-type header. The > problem is that when the JSESSIONID is appended onto the URL it defaults > the mime type to text/plain regardless of the extension. This seems > like a bug
Be sure that it is a feature. > but I'm not sure if this a problem with mod_proxy or > mod_proxy_ajp. I was looking for a flag to turn off JSESSIONID > altogether but it doesn't exist, unfortunately. In the mean time I may > just try using javax.activation.MimetypesFileTypeMap class in my servlet There is javax.servlet.ServletContext.getMimeType(String). > to lookup the mimetypes and set the content-type myself. > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
