AnsweredAssumed Answered

How to serve an XML file

Question asked by leonardo.celati on Apr 22, 2014
Latest reply on Apr 22, 2014 by leonardo.celati
I am currently lost in providing to serve a sitemap.xml file from alfresco.

My purpose is to build an xml conform to schema, but all the tentavies result in having an htrml file on browser.

This is what I have done so far:

sitemap.xml (on alfresco share with mapping sitemap)

This is instead the list of files on the wcmqs webapp:


<?xml version="1.0" encoding="UTF-8"?>
   <description>specific page for sitemap</description>

Then I have this template xml + ftl


<?xml version="1.0" encoding="UTF-8"?>
        <description>Template for sitemap</description>


<?xml version="1.0" encoding="UTF-8" ?>
   <@region id="content" scope="page"/>

Finally I have my webscripts which is supposed to iterate collection and display data


  <shortname>Simple sitemap</shortname>
  <description>Display simple sitemap</description>
  <format default="xml"></any>


<#if collection??>
   // iterate and build tags–>
   // ….
   // <—

But everything results in an empty html file. Besides from investigating on why it is empty, but why the mimetype is set to html ?
What am I doing wrong ?