AnsweredAssumed Answered

Problem adding in some RSS feeds

Question asked by benjim on Jan 30, 2008
Latest reply on Feb 1, 2008 by benjim
I followed the sun tutorial and then made myself a rss-feeds.jsp filee:

<jsp:root version="1.2"
          xmlns:jsp="http://java.sun.com/JSP/Page"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:rss="http://cdl.co.uk/rss"
     xmlns:ds="http://www.alfresco.org/alfresco/ds"
          xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
          xmlns:fn="http://java.sun.com/jsp/jstl/functions">
  <!– xmlns:pr is mapped to /WEB-INF/pr.tld by web.xml –>

  <jsp:output doctype-root-element="html"
         doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
         doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'/>

  <jsp:directive.page language="java" contentType="text/html; charset=UTF-8"/>
  <jsp:directive.page isELIgnored="false"/>

<c:set var="headerXml" value="${ds:getConfiguration(pageContext,'Header')}"/>
      <jsp:include page="${headerXml}"/>


<rss:feed
url="http://static.userland.com/gems/backend/gratefulDead.xml" feedId="example2"/>
<b>Image: </b><rss:channelImage feedId="example2"/><br>
<b>Title: </b><rss:channelTitle feedId="example2"/><br>
<b>Link: </b><rss:channelLink feedId="example2" asLink="true"/><br>
<b>Description: </b><rss:channelDescription feedId="example2"/><br>
<ul>
  <rss:forEachItem feedId="example2">
    <li><rss:itemDescription feedId="example2"/><br /><br /></li>
  </rss:forEachItem>
</ul>

</jsp:root>

Which is referenced from my index.jsp:

          <tr valign="top">
            <td width="100%">
                <jsp:include page="/views/components/rss-feeds.jsp"/>
            </td>
          </tr> 

I added the rss.tld to my webxml and in the rss-feeds.jsp referenced it in the namespace:

WEB.XML
    <taglib>
        <taglib-uri>http://cdl.co.uk/rss</taglib-uri>
        <taglib-location>/WEB-INF/rssutils.tld</taglib-location>
    </taglib> 


Of course i added the relevant Jar in /WEB-INF/lib/

When i try to preview the site i get the following error:

The markup in the document following the root element must be well-formed.

Can anyone help me with this i have followed the sun tutorial sepertate before and it worker.  Tryign to get it working in the Alfresco framework is a big problem.

JSP
      xmlns:rss="http://cdl.co.uk/rss"

Any help much apreciated as im doing a proof of concept to try and persuade people to use Alfresco

Thanks
Ben

Outcomes