Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 24 results.
of 2
Bob Dietrich
RSS Generation
February 2, 2006 3:44 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 221

Join Date: May 15, 2005

Recent Posts

Hello,<br />I&#39;d like to generate RSS article references using LEP&#39;s journal/CMS capabilities. I&#39;m not too familiar with generating RSS, so is this something that could be done using a template (XSL)? Is there an external tool anyone can recommend (prefer free)? Or would I need to write a portlet that uses Informa to generate the article? Anyone have any solutions?<br /><br />Thanks.<br /><br />fastbob
Alexander Chow
RSS Generation
February 2, 2006 9:49 PM
Answer

Alexander Chow

Community Moderator

Rank: Liferay Master

Posts: 518

Join Date: July 19, 2005

Recent Posts

Right now, on liferay.com, we have an RSS feed of some of the news we have. We autogenerate this RSS feed using the CMS (Journal; see <a href="http://www.liferay.com/web/guest/documentation/user_guide/cms/journal)" target="_blank">http://www.liferay.com/web/guest/documenta...de/cms/journal)</a>. Here is the code that is used for the XSLT template:<br /><br />
 1<?xml version=&#34;1.0&#34;?>
 2<xsl&#58;stylesheet xmlns&#58;xsl=&#34;http&#58;//www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;>
 3  <xsl&#58;output method=&#34;xml&#34; indent=&#34;yes&#34; media-type=&#34;text/xml&#34;/>
 4
 5  <xsl&#58;variable name=&#34;articles&#34; select=&#34;document&#40;&#39;http&#58;//@portal_url@/c/journal/get_latest_articles?template_id=LIFERAY-RSS-ITEM&amp;number=10&#39;&#41;/result-set/result&#34; />
 6
 7  <xsl&#58;template match=&#34;/&#34;>
 8    <rss xmlns&#58;dc=&#34;http&#58;//purl.org/dc/elements/1.1/&#34; xmlns&#58;sy=&#34;http&#58;//purl.org/rss/1.0/modules/syndication/&#34; xmlns&#58;admin=&#34;http&#58;//webns.net/mvcb/&#34; version=&#34;2.0&#34;>
 9      <channel>
10        <title>
11          <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;feed-title&#39;&#93;/dynamic-content&#34;/>
12        </title>
13        <link>
14          <xsl&#58;text>http&#58;//@portal_url@/</xsl&#58;text>
15        </link>
16        <description>
17          <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;feed-description&#39;&#93;/dynamic-content&#34;/>
18        </description>
19        <xsl&#58;for-each select=&#34;&#036;articles&#34;>
20          <item>
21            <title>
22              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;title&#39;&#93;/dynamic-content&#34;/>
23            </title>
24            <link>
25              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;link&#39;&#93;/dynamic-content&#34;/>
26            </link>
27            <dc&#58;creator>
28              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;creator&#39;&#93;/dynamic-content&#34;/>
29            </dc&#58;creator>
30            <pubDate>
31              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;pub-date&#39;&#93;/dynamic-content&#34;/>
32            </pubDate>
33            <description>
34              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;description&#39;&#93;/dynamic-content&#34;/>
35            </description>
36          </item>
37        </xsl&#58;for-each>
38      </channel>
39    </rss>
40  </xsl&#58;template>
41</xsl&#58;stylesheet>
<br />It is then accessed through the cmsservlet at the url:<br /><br /><a href="http://www.liferay.com/cms/servlet/liferay-rss.xml" target="_blank">http://www.liferay.com/cms/servlet/liferay-rss.xml</a><br /><br />Basically, we use XSLT to grab the latest ten articles and generate an RSS XML file out of it dynamically.
Bob Dietrich
RSS Generation
February 2, 2006 11:28 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 221

Join Date: May 15, 2005

Recent Posts

<br />It is then accessed through the cmsservlet at the url:<br /><br /><a href="http://www.liferay.com/cms/servlet/liferay-rss.xml" target="_blank">http://www.liferay.com/cms/servlet/liferay-rss.xml</a><br /><br />Basically, we use XSLT to grab the latest ten articles and generate an RSS XML file out of it dynamically.<br />
<br />Terrific, thanks&#33;<br /><br />So if I understand correctly, to recreate this solution I would need a copy of liferay-rss.xml and drop it into server/default/deploy/ext.ear/portal-ejb.jar/com/liferay/portal/cms/servlet, correct? Since I cannot seem to find this file under CVS, would it be possible to get a copy?<br /><br />Thanks.<br /><br />fastbob
Alexander Chow
RSS Generation
February 3, 2006 11:40 AM
Answer

Alexander Chow

Community Moderator

Rank: Liferay Master

Posts: 518

Join Date: July 19, 2005

Recent Posts

No you don&#39;t. In my example, &quot;liferay-rss.xml&quot; is actually the name of a journal article that I created. The CMS Servlet will grab any article based on its ID in the URL.
Bob Dietrich
RSS Generation
February 3, 2006 12:21 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 221

Join Date: May 15, 2005

Recent Posts

Thanks for clearing up my confusion.<br /><br />fastbob
Bob Dietrich
RSS Generation
March 1, 2006 9:36 AM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 221

Join Date: May 15, 2005

Recent Posts

Alexander,.<br />Sorry to bother you again, but another member of the forum (trivd) has pointed out that the template you posted (LIFERAY-RSS) actually refers to another template called LIFERAY-RSS-ITEM. Would you please post that template as well? Thanks very much.
Tri www.VSSIC.com
RSS Generation
March 1, 2006 8:16 PM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

sorry , i can&#39;t success <img src="@theme_images_path@/emotions/sad.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="sad.gif" /> Let me tell you my way - is this true ?<br /><br />1- Goto journal portlet , in CMS community.<br /><br />2- Create template , set id and name as : LIFERAY-RSS-ITEM. Content of this template has been pasted from your code .<br /> a- in this step - i consider where is Structure with name and id : LIFERAY-RSS-ITEM ?<br /> b- when i read the code of servlet :<!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->get_latest_articles?template_id=LIFERAY-RSS-ITEM&amp;number=10<!--colorc--></span><!--/colorc--> . I can see the servlet gets lastest &quot;number&quot; articles that associate with &quot;template_id=LIFERAY-RSS-ITEM&quot;. <br /> --&#62;&gt; So you recommend me create journals that associate with this template ?<br /> c- if i want to export rss from another articles (not associate with &quot;template_id=LIFERAY-RSS-ITEM&quot;)- how can i do ?<br /><br />3- Create journal article, set id and name as : liferay-rss.xml . This journal associates with LIFERAY-RSS-ITEM template.<br /><br />4- Call url : <a href="http://portal_host/cms/servlet/liferay-rss.xml" target="_blank">http://portal_host/cms/servlet/liferay-rss.xml</a><br /><br />plz tell me how i&#39;m wrong ?<br />Many thanks &#33;<br />Trivd
Alexander Chow
RSS Generation
March 1, 2006 8:36 PM
Answer

Alexander Chow

Community Moderator

Rank: Liferay Master

Posts: 518

Join Date: July 19, 2005

Recent Posts

Here&#39;s the structure: <br /><br />
1<root>
2  <dynamic-element name=&#39;title&#39; type=&#39;text&#39;></dynamic-element>
3  <dynamic-element name=&#39;creator&#39; type=&#39;text&#39;></dynamic-element>
4  <dynamic-element name=&#39;pub-date&#39; type=&#39;text&#39;></dynamic-element>
5  <dynamic-element name=&#39;link&#39; type=&#39;text&#39;></dynamic-element>
6  <dynamic-element name=&#39;description&#39; type=&#39;text_box&#39;></dynamic-element>
7</root>
<br /><br />And template:<br />
 1<?xml version=&#34;1.0&#34;?>
 2
 3<xsl&#58;stylesheet xmlns&#58;xsl=&#34;http&#58;//www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;>
 4  <xsl&#58;template match=&#34;/&#34;>
 5    <b>
 6      <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;title&#39;&#93;/dynamic-content&#34;/>
 7    </b>
 8    <br/>
 9    <br/>
10    <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;description&#39;&#93;/dynamic-content&#34;/>
11    <br/>
12    <a>
13      <xsl&#58;attribute name=&#34;href&#34;>
14        <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;link&#39;&#93;/dynamic-content&#34;/>
15      </xsl&#58;attribute>
16      <xsl&#58;text>Read more...</xsl&#58;text>
17    </a>
18  </xsl&#58;template>
19</xsl&#58;stylesheet>
<br />
Bob Dietrich
RSS Generation
March 1, 2006 10:00 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 221

Join Date: May 15, 2005

Recent Posts

<br />Here&#39;s the structure: <br />...<br />
<br />Terrific, thanks very much.
Tri www.VSSIC.com
RSS Generation
March 2, 2006 12:35 AM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

Thanks &#33; But there are troubles in my case &#33;<br /> Your helps lead me can be generating articles from URL : <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://@portal_url@/c/journal/get_latest_articles?template_id=LIFERAY-RSS-ITEM&amp;number=10<!--colorc--></span><!--/colorc-->. <b>Articles in XML format but not yet in RSS</b> , so we need a LIFERAY-RSS.xml (assume this name) struture and LIFERAY-RSS.xml template to format this article(s) XML . Is this true ?<br /> I&#39;m not good at in XML , so can you post to forum that code , or can you give me some suggestions ?<br /> Thanks again &#33;
Tri www.VSSIC.com
RSS Generation
March 2, 2006 12:01 PM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

hi all . Now i can see your idea to export RSS <img src="@theme_images_path@/emotions/smile.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="smile.gif" /> <br /> Here is my way in details :<br /> <b>1 - Create Structure and Template - set name and id LIFERAY-RSS-ITEM</b>. And content of LIFERAY-RSS-ITEM structure and LIFERAY-RSS-ITEM template<br /> <br />
<br />Here&#39;s the structure: <br /><br />
1<root>
2  <dynamic-element name=&#39;title&#39; type=&#39;text&#39;></dynamic-element>
3  <dynamic-element name=&#39;creator&#39; type=&#39;text&#39;></dynamic-element>
4  <dynamic-element name=&#39;pub-date&#39; type=&#39;text&#39;></dynamic-element>
5  <dynamic-element name=&#39;link&#39; type=&#39;text&#39;></dynamic-element>
6  <dynamic-element name=&#39;description&#39; type=&#39;text_box&#39;></dynamic-element>
7</root>
<br /><br />And template:<br />
 1<?xml version=&#34;1.0&#34;?>
 2
 3<xsl&#58;stylesheet xmlns&#58;xsl=&#34;http&#58;//www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;>
 4  <xsl&#58;template match=&#34;/&#34;>
 5    <b>
 6      <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;title&#39;&#93;/dynamic-content&#34;/>
 7    </b>
 8    <br/>
 9    <br/>
10    <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;description&#39;&#93;/dynamic-content&#34;/>
11    <br/>
12    <a>
13      <xsl&#58;attribute name=&#34;href&#34;>
14        <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;link&#39;&#93;/dynamic-content&#34;/>
15      </xsl&#58;attribute>
16      <xsl&#58;text>Read more...</xsl&#58;text>
17    </a>
18  </xsl&#58;template>
19</xsl&#58;stylesheet>
<br />
<br /><br /> <b>2- Create several journal articles that associate with LIFERAY-RSS-ITEM structure and LIFERAY-RSS-ITEM template</b>, so that after created, the servlet <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://@portal_url@/c/journal/get_latest_articles?template_id=LIFERAY-RSS-ITEM&amp;number=10<!--colorc--></span><!--/colorc--> will return atleast &gt;0 lastest article in XML file ( lastest articles that associate with template_id=LIFERAY-RSS-ITEM , number &lt; 10 )<br /> <br /> <b>3- Create Structure and Template - set name and id LIFERAY-RSS-XML</b>. And content of LIFERAY-RSS-XML structure and LIFERAY-RSS-XML template:<br /> <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><br /><br />Here&#39;s the structure: <br /><br />
1<root>
2  <dynamic-element name=&#39;feed-title&#39; type=&#39;text&#39;></dynamic-element>
3  <dynamic-element name=&#39;feed-description&#39; type=&#39;text&#39;></dynamic-element>
4</root>
<br /><br />And template:<br />
 1<?xml version=&#34;1.0&#34;?>
 2<xsl&#58;stylesheet xmlns&#58;xsl=&#34;http&#58;//www.w3.org/1999/XSL/Transform&#34; version=&#34;1.0&#34;>
 3  <xsl&#58;output method=&#34;xml&#34; indent=&#34;yes&#34; media-type=&#34;text/xml&#34;/>
 4
 5  <xsl&#58;variable name=&#34;articles&#34; select=&#34;document&#40;&#39;http&#58;//@portal_url@/c/journal/get_latest_articles?template_id=LIFERAY-RSS-ITEM&#91;b&#93;&amp;&#91;/b&#93;number=10&#39;&#41;/result-set/result&#34; />
 6
 7  <xsl&#58;template match=&#34;/&#34;>
 8    <rss xmlns&#58;dc=&#34;http&#58;//purl.org/dc/elements/1.1/&#34; xmlns&#58;sy=&#34;http&#58;//purl.org/rss/1.0/modules/syndication/&#34; xmlns&#58;admin=&#34;http&#58;//webns.net/mvcb/&#34; version=&#34;2.0&#34;>
 9      <channel>
10        <title>
11          <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;feed-title&#39;&#93;/dynamic-content&#34;/>
12        </title>
13        <link>
14          <xsl&#58;text>http&#58;//@portal_url@/</xsl&#58;text>
15        </link>
16        <description>
17          <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;feed-description&#39;&#93;/dynamic-content&#34;/>
18        </description>
19        <xsl&#58;for-each select=&#34;&#036;articles&#34;>
20          <item>
21            <title>
22              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;title&#39;&#93;/dynamic-content&#34;/>
23            </title>
24            <link>
25              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;link&#39;&#93;/dynamic-content&#34;/>
26            </link>
27            <dc&#58;creator>
28              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;creator&#39;&#93;/dynamic-content&#34;/>
29            </dc&#58;creator>
30            <pubDate>
31              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;pub-date&#39;&#93;/dynamic-content&#34;/>
32            </pubDate>
33            <description>
34              <xsl&#58;value-of disable-output-escaping=&#34;yes&#34; select=&#34;root/dynamic-element&#91;@name=&#39;description&#39;&#93;/dynamic-content&#34;/>
35            </description>
36          </item>
37        </xsl&#58;for-each>
38      </channel>
39    </rss>
40  </xsl&#58;template>
41</xsl&#58;stylesheet>
<br /><br /><br /> In this step , plz note that http://@portal_url@/c/journal/get_latest_articles?template_id=LIFERAY-RSS-ITEM<b>&amp;</b>number=10 , i replace &amp; by &amp; - because &amp; is Escape Character in XML file .<br /><br /> <b>4- Create journal article that associate with LIFERAY-RSS-XML structure and LIFERAY-RSS-XML template</b> , i set name this article to LIFERAY-RSS-XML. In my case , the content of LIFERAY-RSS-XML is : <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><br /> &lt;?xml version=&quot;1.0&quot;?&gt;<br />&lt;root&gt;<br /> &lt;dynamic-element name=&quot;feed-title&quot; type=&quot;text&quot;&gt;<br /> &lt;dynamic-content&gt;&lt;&#33;[CDATA[ rss from liferay]]&gt;&lt;/dynamic-content&gt;<br /> &lt;/dynamic-element&gt;<br /> &lt;dynamic-element name=&quot;feed-description&quot; type=&quot;text&quot;&gt;<br /> &lt;dynamic-content&gt;&lt;&#33;[CDATA]&gt;&lt;/dynamic-content&gt;<br /> &lt;/dynamic-element&gt;<br />&lt;/root&gt;<br /><br /><br /> <b>5- Browse URL : <a href="http://portal_host/cms/servlet/liferay-rss.xml" target="_blank">http://portal_host/cms/servlet/liferay-rss.xml</a> </b> that will returns RSS format xml file( this example: CMS community and article-name : liferay-rss.xml). Now simple paste URL to RSS reader - we can use RSS portlet in Liferay.
Tri www.VSSIC.com
RSS Generation
March 4, 2006 11:21 AM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

hi anyone &#33; I have something to discuss <img src="@theme_images_path@/emotions/smile.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="smile.gif" /> <br /> <b>1</b>- The <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://www.liferay.com/cms/servlet/LIFERAY-RSS.XML<!--colorc--></span><!--/colorc--> can&#39;t display in Internet Explorer (as rss usual) when you browse it , and in FireFox it&#39;s okie &#33; . I think reason is CONTENT_TYPE=TEXT/HTML, so have you got any idea ? <br /> <b>2</b>- The rss reader cant&#39; parse <a href="http://www.liferay.com/cms/servlet/LIFERAY-RSS.XML" target="_blank">http://www.liferay.com/cms/servlet/LIFERAY-RSS.XML</a> if there is article in UTF-8 Character. Example : the origin UTF-8 string &quot;Việt Nam&quot; is modified to &quot;Vi?t Nam&quot; <img src="@theme_images_path@/emotions/huh.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="huh.gif" /> <br /> The URL : <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://@portal_url@/c/journal/get_latest_articles?template_id=LIFERAY-RSS-ITEM&amp;number=10<!--colorc--></span><!--/colorc--> returns okie, the UTF-8 characters display well in below format :<br /> &lt;?xml version=&quot;1.0&quot; &gt; ..... <b> Việt Nam</b> ]]&gt;&lt;/dynamic-content&gt; ...<br /> so have you got any idea ?<br /> Here , i had a test by rem : <br /> <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><br /> content = StringUtil.replace(<br /> content,<br /> &quot;&lt;?xml version=&#092;&quot;1.0&#092;&quot; encoding=&#092;&quot;UTF-8&#092;&quot;?&gt;&quot;,<br /> &quot;&lt;?xml version=&#092;&quot;1.0&#092;&quot;?&gt;&quot;);<br /> <br /> so that the string &quot;&lt;?xml version=&quot;1.0&quot; &gt; &quot; is replaced by &lt;?xml version=&#092;&quot;1.0&#092;&quot; encoding=&#092;&quot;UTF-8&#092;&quot;?&gt; in the result <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->get_latest_articles<!--colorc--></span><!--/colorc-->. But there is still error <img src="@theme_images_path@/emotions/smile.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="smile.gif" /><br /> <br /> <b>3</b>- The tag &lt;dc:language&gt;vi-VN&lt;/dc:language&gt; - no effect here. The XML format has damaged: &quot;Vi?t Nam&quot; . If i use a editor and modify it to &quot;Việt Nam&quot;, the Rss reader can read it well &#33;<br /> i&#39;m looking forward to hearing from you soon . Have a nice weekend <img src="@theme_images_path@/emotions/smile.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="smile.gif" /> <br /> Trivd
Tri www.VSSIC.com
RSS Generation
March 4, 2006 10:00 PM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

I see the trouble occurs in the URL : <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://www.liferay.com/cms/servlet/LIFERAY-RSS.XML<!--colorc--></span><!--/colorc-->- If i put LIFERAY-RSS.XML (<b>UTF-8</b>) as a article in Journal Content it&#39;s okie.- But when i call by URL it&#39;s broken <img src="@theme_images_path@/emotions/sad.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="sad.gif" />
Tri www.VSSIC.com
RSS Generation
March 5, 2006 10:22 AM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

<br />I see the trouble occurs in the URL : <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://www.liferay.com/cms/servlet/LIFERAY-RSS.XML<!--colorc--></span><!--/colorc-->- If i put LIFERAY-RSS.XML (<b>UTF-8</b>) as a article in Journal Content it&#39;s okie.- But when i call by URL it&#39;s broken <img src="@theme_images_path@/emotions/sad.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="sad.gif" /><br />
<br /><br /> okie , now everthing is okie <img src="@theme_images_path@/emotions/smile.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="smile.gif" /> <br /> poor me . I had integration FCEditor to Liferay : <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://support.liferay.com/browse/LEP-425<!--colorc--></span><!--/colorc--> , and <b>set strip=0 and compress=0</b> for all fck editor content- so the servlet encoding not set to the UTF-8 <img src="@theme_images_path@/emotions/cool.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="cool.gif" /> --&#62;&gt; LIFERAY-RSS.XML damages.<br /> 1- In temporization, I set com.liferay.filters.compression.CompressionFilter=true (system.properties)<br /> Other way :<br /> * Add new ServletFilter-set the encoding=UTF8.<br /> * Modify web.xml (cms-web project)<br /> 2- add tag : <b>&lt;language&gt;vi-VN&lt;/language&gt;</b> (in my case : Vietnamese) to LIFERAY-RSS.XML<br /> Have a nice week <img src="@theme_images_path@/emotions/smile.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="smile.gif" /> <br /> Regards <br /> Trivd
Tri www.VSSIC.com
RSS Generation
March 5, 2006 1:06 PM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

look at this issue : <a href="http://support.liferay.com/browse/LEP-508" target="_blank">http://support.liferay.com/browse/LEP-508</a> <br /> <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><br /> Comment by Vedran Pugar [11/Feb/06 12:02 AM]<br />[ Permlink ]<br />I am using version 4.0.0 from CVS, with postgres db (UNICODE encoding), jdk 1.5 and tomcat 5.5.12. I had same problems with Croatian characters...<br />And solved my problems by changing line in the<br /><br />com.liferay.util.xml.XMLFormatter.toString(Branch branch, String indent):<br /><br />from<br />String content = baos.toString();<br /><br />to<br />String content = baos.toString(&quot;UTF-8&quot;); <br /><br /> <br /><br /> I do that but nothing better <img src="@theme_images_path@/emotions/mad.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="mad.gif" /> <br /> Do you now simplest way so I can use <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->FCKEditor<!--colorc--></span><!--/colorc-->( disable CompressionFilter and Strip servlet filter ) , and also call <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://www.liferay.com/cms/servlet/LIFERAY-RSS.XML<!--colorc--></span><!--/colorc--> well in UTF-8 character article ?
Alexander Chow
RSS Generation
March 7, 2006 10:02 PM
Answer

Alexander Chow

Community Moderator

Rank: Liferay Master

Posts: 518

Join Date: July 19, 2005

Recent Posts

It doesn&#39;t display in IE because the CMS servlet right now only spits out HTML. But, if you hit the site with IE, you can view the source and see the XML. Is your unicode correct in there? Also, have you tried setting the optional language element for the channel to vietnamese (VI-VN, I think)?
Tri www.VSSIC.com
RSS Generation
March 8, 2006 11:10 PM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

<br />It doesn&#39;t display in IE because the CMS servlet right now only spits out HTML. But, if you hit the site with IE, you can view the source and see the XML. Is your unicode correct in there? Also, have you tried setting the optional language element for the channel to vietnamese (VI-VN, I think)?<br />
<br /><br /> thanks for your reply - Alex <img src="@theme_images_path@/emotions/smile.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="smile.gif" /> . I still have troubles<br /> <b>1</b>- When you browse URL : <a href="http://www.liferay.com/cms/servlet/liferay-rss.xml" target="_blank">http://www.liferay.com/cms/servlet/liferay-rss.xml</a> , and view page-source, this screen will appeare as my attachment file - messagebox <br /> <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--> <br /> Null characters (00H) contained in the file will be replaced with spaces.<br /> ---------------------------<br /> OK Cancel <br /> <br /> <b> 2</b>-I typed above : i love FCK Editor - so if i want to use it, I have to disable set strip=0 and compress=0. And this task also disalbe Request.setCharacterEncoding=UTF-8 --&#62; the result of URL <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://portal.hyperlogy.com/cms/servlet/liferay-rss.xml<!--colorc--></span><!--/colorc--> can&#39;t display Unicode characters &#33;<br /> So when i enable compress=0 , the servlet ( <!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://portal.hyperlogy.com/cms/servlet/liferay-rss.xml<!--colorc--></span><!--/colorc--> )returns Unicode as well. But when you set this URL like a url-source for a RSS Reader, it can&#39;t be read <img src="@theme_images_path@/emotions/sad.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="sad.gif" /> . <br /> But when I view page source (use Firefox browser), and save to XML file , put into my portal (<!--coloroemoticonFF0000--><span style="coloremoticonFF0000"><!--/coloro-->http://portal.hyperlogy.com/Vietnam/RSS/LIFERAY-RSS.XML<!--colorc--></span><!--/colorc-->), and paste URL like a source into RSS Reader , it displays well <img src="@theme_images_path@/emotions/roll_eyes.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="rolleyes.gif" /> <br /> 3- I write a servletFilter - plug into CMS-WEB project (apply for servlet cms/servlet/acrticleId), set Request.setCharacterEncoding=UTF-8. The servlet filter runs, but result still not in UTF-8
Attachment

Attachments: liferay_rss_xml_screenshot.JPG (19.4k)
Alexander Chow
RSS Generation
March 9, 2006 9:31 PM
Answer

Alexander Chow

Community Moderator

Rank: Liferay Master

Posts: 518

Join Date: July 19, 2005

Recent Posts

I think your problems are that you are generating an invalid RSS feed. Look at the validation and fix those errors:<br /><br /><a href="http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fportal.hyperlogy.com%2FVietnam%2FRSS%2FLIFERAY-RSS.XML" target="_blank">http://www.feedvalidator.org/check.cgi?url...LIFERAY-RSS.XML</a>
Tri www.VSSIC.com
RSS Generation
March 10, 2006 5:18 AM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

<br />I think your problems are that you are generating an invalid RSS feed. Look at the validation and fix those errors:<br /><br /><a href="http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fportal.hyperlogy.com%2FVietnam%2FRSS%2FLIFERAY-RSS.XML" target="_blank">http://www.feedvalidator.org/check.cgi?url...LIFERAY-RSS.XML</a><br />
<br /><br /> Sorry, I dont&#39; think so - Alex &#33;<br /> Without UTF-8 article , this URL can be read normally by FeedReader or LEP RSS portlet. My problem occurs if there is UTF-8 RSS-ITEM article. The AS log below :<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><br />13:12:54,828 ERROR <a href="http://portal.hyperlogy.com/cms/servlet/LIFERAY-RSS.XML" target="_blank">http://portal.hyperlogy.com/cms/servlet/LIFERAY-RSS.XML</a> de.nava.informa.core<br />.ParseException: ParseException: Error in building: Invalid byte 2 of 4-byte UTF-8 sequence.<br />13:12:54,828 ERROR [] Servlet.service() for servlet jsp threw exception<br />java.lang.NullPointerException<br /> at org.apache.jsp.html.portlet.rss.view_jsp._jspService(org.apache.jsp.html.portlet.rss.view_jsp:419)<br /> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)<br /><br /> Remind that when I view page source (use Firefox browser), and save to XML file , put into my portal (http://portal.hyperlogy.com/Vietnam/RSS/LIFERAY-RSS.XML), and paste URL like a source into RSS Reader , it displays well <img src="@theme_images_path@/emotions/cool.gif" style="vertical-align:middle" emoid="emoticon" border="0" alt="cool.gif" />
Tri www.VSSIC.com
RSS Generation
March 11, 2006 4:21 AM
Answer

Tri www.VSSIC.com

Rank: Junior Member

Posts: 31

Join Date: June 8, 2005

Recent Posts

take a time to look at this issue <a href="http://support.liferay.com/browse/LEP-273" target="_blank">http://support.liferay.com/browse/LEP-273</a>
Showing 1 - 20 of 24 results.
of 2