cancel
Showing results for 
Search instead for 
Did you mean: 

Content type in Freemarker output

zaccret
Champ in-the-making
Champ in-the-making
Hi,
I am trying to create a XHTML site frontend with Surf usinfg Freemarker templates. I have the tag
<meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8" />
in my template but Freemarker/Surf doesn't seem to take care about.

Here is my page :
<?xml version='1.0' encoding='UTF-8'?>
<page>
   <id>main</id>
   <title>The main page</title>
   <template-instance>site</template-instance>
   <authentication>user</authentication>
</page>

Here is the "site" template (site.ftl) :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
   <meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8" />
   <link rel="stylesheet" href="${url.context}/css/style.css" type="text/css" />
      <title>${page.title}</title>
</head>
<body>
   <div id="site">
      <@region id="header" scope="global" />
      <@region id="left" scope="global" />
      <@region id="content" scope="page" />
   </div>
</body>
</html>

But in the HTTP response, I see that the Content-type header is "text/html".
(How) Can I change this, please ?

Cheers,
1 REPLY 1

drozes
Champ in-the-making
Champ in-the-making
Hi, did you ever fine a solution to this?