Re: Set the mime type of a returned page

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Tuesday, March 11, 2008, 2:33:09 AM, Kane Dijkman wrote:

> I am creating a css file dynamically. When I return this through FM  
> Firefox gives an error because the mime type is text/html instead of  
> text/css. Is there a way to set this with FM? Something like <#ftl  
> mime="text/css">>

No. FreeMarker is not even HTTP-aware, it just generates the "body" of
the response. It's up to the Web application framework to do
HTTP-related stuff, like properly setting the response headers.

-- 
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.