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 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 
to lookup the mimetypes and set the content-type myself.



?

On Mon, 4 Jan 2010 12:22:28 +0300, "Konstantin Kolinko"
<knst.koli...@gmail.com> said:
> 2010/1/4 Darren Salomons <tom...@digid.mailcan.com>:
> > I am having an issue with Apache 2/mod_proxy_ajp and Tomcat 6.  I have
> > monitored all the headers coming back from apache for various scenarios
> > and the only scenario that I am having a problem with is when I have a
> > JSESSIONID appended to the URL.  When the JSESSIONID is appended to the
> > URL the mime type coming back from apache is text/plain.  When the
> > JSESSIONID is not there then the correct mime type is returned.  What
> > would cause this?
> >
> 
> 1. Your configuration, and exact versions of Tomcat and Apache that
> you are using =?
> 
> > When the JSESSIONID is appended to the
> > URL the mime type coming back from apache is text/plain.
> 
> Is the mime-type that you are seeing provided by Tomcat (as defined in
> $CATALINA_BASE/conf/web.xml, or in WEB-INF/web.xml files of individual
> web applications),  or provided/overwritten by Apache HTTPD?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to