cancel
Showing results for 
Search instead for 
Did you mean: 

Problem adding in some RSS feeds

benjim
Champ in-the-making
Champ in-the-making
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:feedurl="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
3 REPLIES 3

benjim
Champ in-the-making
Champ in-the-making
Now working figured it out.

kvc
Champ in-the-making
Champ in-the-making
Mind sharing with the forum, in case others have the same issue?

Appreciated!

Kevin

benjim
Champ in-the-making
Champ in-the-making
<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"/><h2>IAIN</h2><rss:feedurl="http://www.postmagazine.com/ME2/Console/XmlSyndication/Display/RSS.asp?xsid=05BDF568EA2546AAB12B8622..." feedId="postMagazine"/><b>Title: </b><rss:channelTitle feedId="postMagazine"/><br /><ul>  <rss:forEachItem feedId="postMagazine" startIndex="1" endIndex="3">    <li><rss:itemDescription feedId="postMagazine"/><br><br>  </rss:forEachItem></ul></jsp:root>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This works above if the taglib and jars are in your project.