views:

61

answers:

4

Hey

I want to add RSS feeds to my page. And i am making a page in Servlet in netbeans 6.7.1

How can i add RSS code? I mean what lib and what specific code should i write?

-Sundhas

+1  A: 

Sun hava a nice tutorial: http://java.sun.com/developer/technicalArticles/javaserverpages/rss_utilities/

Tim Krüger
TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer (new javax.xml.transform.stream.StreamSource ("http://localhost:80/google_style_sheet.xsl")); transformer.transform (new javax.xml.transform.stream.StreamSource ("http://localhost:80/google_business_news.xml"), new javax.xml.transform.stream.StreamResult(out)); } catch (Exception e) { out.println(e.getMessage()); }Will this code generate a Feed for me?
Sundhas
+1  A: 

Here's a nice tutorial for creating your feed. The Sun tutorial given by others concerns consuming the feed, not creating it.

JRL
+1  A: 

From my remembrances, the best Java library for RSS production and the such is ROME.

Riduidel
A: 

No doubt about it ROME is the best out there. I have recently used it once again with servlets this time. Its very easy to go ahead with it.

Page to RomeRss https://rome.dev.java.net/

By far this tutorials is good and works.

http://www.javaworld.com/javaworld/jw-11-2007/jw-11-rome.html

Shaaf