Availability
Available as of blojsom 2.29
Description
Allows you to use URLs like http://your.site.com/blojsom/blog/default/feed/
to retrieve a default, configurable flavor or http://your.site.com/blojsom/blog/default/feed/rss2/
to retrieve a specific flavor.
Installation and Configuration
Add the following to the top of /WEB-INF/web.xml with the other filter definitions.
<filter>
<filter-name>FeedFilter</filter-name>
<filter-class>org.blojsom.filter.FeedFilter</filter-class>
<init-param>
<param-name>default-feed-type</param-name>
<param-value>rss2</param-value>
</init-param>
<init-param>
<param-name>permalink-extensions</param-name>
<param-value>.html, .txt</param-value>
</init-param>
</filter>
| Initialization parameter |
Optional |
Default |
Description |
| default-feed-type |
true |
rss2 |
Sets the default feed type when one is not requested after the /feed/ portion in the URL. |
| permalink-extensions |
true |
.html, .txt |
Identifies how permalinks will be recognized in the URL. |
Add the following to the top of /WEB-INF/web.xml with the other filter-mapping definitions. This filter-mapping should be placed before the PermalinkFilter mapping.
<filter-mapping>
<filter-name>FeedFilter</filter-name>
<servlet-name>blojsom</servlet-name>
</filter-mapping>
Usage
Add /feed/ to the end of your blog's URL to request the default feed type.
Alternatively, you may add /feed/(feed-type)/ on the end of your blog's URL to request a feed type of (feed-type). For example, /feed/atom/, would request the Atom feed for your blog.