我想在站点增加RSS功能,但不知道如何实现,在google搜不到JSP的实现,大家能否给点提示或是链接?
解决方案 »
- 求适合javascript自学的教材
- httpunit 测试,如何解决session 问题?
- 关于tomcat访问日志的设置问题,求助! 急急
- spring中jms的问题
- 【请教】怎样用jsp/servlet等做一个超市销售管理系统?(在校学生)
- 运行一个servlet出错,请帮忙
- [求助]关于SessionBean返回Blob类型值的问题(100分,在线等)
- 用jbuilder生成的applet在客户端用不了?
- 用jsp开发简直就是噩梦!!!!!!!!啊啊啊啊啊啊!!!
- 怎么访问其他电脑的8080端口(同网段)
- 谁能发一下FCKeditor支持jsp的,http://www.fckeditor.net/一直打不开
- JSF如何以不通过输入框的方式,在页面中设置组件的属性值???
http://hi.baidu.com/zuec/blog/item/a62425a44c5744f79052ee87.html
"from RssContent rc order by rc.published desc ", 0, 20); SyndFeed feed = new SyndFeedImpl();
feed.setFeedType(feedType); feed.setTitle("cobola 和 java 在一起");
feed.setLink("http://cobola.kongbo.org");
feed.setDescription("java , xml , linux , 网络 ,好好学习");
feed.setCopyright("cobola @ kongbo.org "); SyndImage image = feed.getImage();
if (image != null) {
image.setLink("http://cobola.kongbo.org/images/rssplanet.jpg");
image.setDescription("RSS星球,RSS汇聚,分类,标签,评价,分享.");
image.setTitle("RSS星球");
} feed.setImage(image);
List entries = new ArrayList();
SyndEntry entry;
SyndContent description; entry = new SyndEntryImpl();
for (Iterator iter = list.iterator(); iter.hasNext();) {
try {
RssContent r = (RssContent) iter.next(); entry = new SyndEntryImpl();
entry.setTitle(StringUtil.cleanHtml(r.getTitle()));
String href = "http://cobola.kongbo.org/cobola/rss.khtml?action=show&id="
+ r.getId();
entry.setLink(href);
entry.setPublishedDate(r.getPublished());
entry.setUpdatedDate(r.getUpdated()); description = new SyndContentImpl();
description.setType("text/html");
description.setValue(StringUtil.getSmall(r.getContent(), 500));
entry.setDescription(description);
entries.add(entry);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} }
feed.setEntries(entries);
// 将XML数据写到浏览器
response.setContentType("text/xml");
response.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter(); SyndFeedOutput output = new SyndFeedOutput();
output.output(feed, out);
out.close();
* System.out.println(" (rss_0.90, rss_0.91, rss_0.92, rss_0.93, rss_0.94,
* rss_1.0 rss_2.0 or atom_0.3)");
*
*/可以生成以下类型的RSS