Accessing the installed Feed Samples

Samples for ATOM and RSS feeds
The Feed servlet is available at the following default URL: http://servername:port/contextroot/feed. An example url would look like http://localhost:9080/SampleFeedApp. Now try the following options to test the support to read RSS and ATOM content, in addition to ATOM content generation support. Note: The default port and context root for WebSphere® Application Server Community Edition 2.x is 8080 and fs respectively.
Samples for ATOM Publishing Protocol (APP)
The FeedAPPServlet, subclass of the default Abdera Servlet, serves the Atom publishing protocol (APP) samples. The AbderaServlet is the entry point to the Abdera server framework. The FeedAPPServlet extends the AbderaServlet and when a request is dispatched to the servlet, it creates a RequestContext object and forwards it on to a custom Provider. The provider in trun is responsible for implementing all the business logic of the server, mapping the Atom Publishing Protocol methods into code that manipulates some back-end persistence layer. This servlet is available at the http://localhost:9080/SampleFeedApp/atom/. The APP samples require HTTP operations to work with the feed entries. For example: There are two options to perform these operations on the feed, and view the results: The cURL options to work with the APP sample are listed below. To perform a create (POST) or an update(PUT) entry operation, the entry content is passed using an entry.xml document. The content of this document is as shown below.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
	<title type="text">Eclipse on the browser</title>
	<id>urn:uuid:4C93763032355C1C4B1192649345469</id>
	<author>
		<name>IBM User 1</name>
	</author>
	<updated>2007-10-16T18:05:46.469Z</updated>
	<link href="feedcolln/feed/eclifox" rel="edit"></link>
	<source xml:base="http://www.alphaworks.ibm.com/"
		xmlns:xml="http://www.w3.org/XML/1998/namespace">
		<title type="text">
			IBM alphaWorks Emerging Technologies :
		</title>
		<link href="http://www.alphaworks.ibm.com/"></link>
		<updated>2007-10-16T18:05:46.469Z</updated>
		<author>
			<name>alphaWorks Author</name>
		</author>
		<id>http://www.alphaworks.ibm.com/</id>
		<category term="technology-updates"></category>
	</source>
</entry>
The entry.xml contains a new entry definition containing the basic entry title, author, location link. Note: A few points to note, before running curl or viewing the samples in the browser: Now, we are ready to execute the curl commands. Alternately, the GET operations could also be performed by opening the url in a browser. These are explained for every GET command.
  1. Retrieve the service document for the Abdera server, using:
  2. Retrieve the entire feed, using
  3. Retrieve a specific feed entry, using
  4. Create an entry, using POST:
  5. Update a specific entry, using PUT:
  6. Remove an entry, using DELETE:
Note: It is documented as 'localhost', '9080' and 'SampleFeedApp' for the host name, servlet port and context root. This might vary according to the server configuration.

Trouble shooting

PUT and DELETE methods do not work
Certain feeds are not being read by the abdera libraries
Current Java 2 Security policy reported a potential violation of Java 2 Security Permission.
Changing the FeedAPPServlet's url-pattern in web.xml
If you intend to change the url-pattern for FeedAppServlet - the one that provides Atom Publishing Protocol support - then ensure that the url-pattern is changed in the <SOURCE_FOLDER>/com/ibm/ajax/feeds/app/samples/feed_settings.properties file too. For instance, if the value changes in the web.xml from /atom/* to /publish/*, then set the value /publish in the properties file. This is to ensure that the URL for the feeds is correctly resolved by the Abdera server. Otherwise, this will result in a 404 - File not found error.