Hi Guys.In todays time we have a need to keep our websites updated with all the latest information & content , so that the visitors will keep on getting all the relevant updates regarding their relevant topics or themes.
Rich Site Summary, also known as RSS feeds commonly are mostly used by the site administrators to provide the visitors with the latest updates regarding new Posts ,Blogs etc, in a common format.These are basically XML files with some metatags like "link","author","description" etc which provide the details of our blogs & updated contents.These XML files are parsed into formatted content using RSS Reader , News Reader etc tools to show updated content to the visitors.
In order to have our own RSS feeds what we need only is a view & a controller for that view.
Lets suppose we have a domain BlogEntry which stores the data of the bolgs in our site and what we want is to have our feeds shown at /feeds url in browser.
So we can generate a controller simple like :
Here we have set the response content-type as XML , so our output page will be an XML instead simple html and content will be parsed like an XML page which is required for RSS.
The second thing to note here is the date-format.This should be very specific as the date shown & parsed in the RSS Readers is in full (EEE, dd MMM yyyy HH:mm:ss Z) format.
The respective index.gsp should be written as :
The attributes used in the above XML are metatags which are used to give additional information about your site & specific posts or blogs.You can add additional pre-defined metatags based on your requirements.
Do give the above method a try instead of using any plugin as it is easy to understand,fully customised & hassle free approach.