tags:

views:

27

answers:

1

Hie I have a page in my java/jsp based web application which shows list of new products..

I want to provide an rss feed for this. So, what is way to create a rss feed which other can use to subscribe?

I could find some java based feed creators. But, the question is how the feed will be self updating based on new products added to the system?

+1  A: 

I'm not familiar with Java, so here's a general thought.

Your feed should be accessible via some URL, like http://mydomain.com/products/feeds/rss. When Feed Aggregator fetches this URL, the servlet (I believe this is how they are called in Java world) fetches a list of recent products from the DB or wherever, build RSS feed and then sends it back to the requester, which turns out to be a Feed Aggregator.

For performance reasons this particular servlet may not access the database each time it's executing. Rather, it can cache either resulting feed (recommended, HTTP allows for a very flexible caching) or a result of database query somewhere in memory/on disk.

Anton Gogolev