This implementation is made up of an {@link com.sun.syndication.propono.atom.server.AtomHandler} named {@link com.sun.syndication.propono.atom.server.impl.FileBasedAtomHandler} and {@link com.sun.syndication.propono.atom.server.impl.FileBasedAtomHandlerFactory}, which sub-classes {@link com.sun.syndication.propono.atom.server.AtomHandlerFactory}.
To use this implementation in your web application, here are the steps:
Normally this is done by placing the Propono jar in your webapp's
WEB-INF/lib
directory.
For example, you might add something like the following to
declare the {@link com.sun.syndication.propono.atom.server.AtomServlet}
and then to map it to the path /app
<servlet> <description>Atom Publishing Protocol Servlet</description> <servlet-name>AtomServlet</servlet-name> <servlet-class>com.sun.syndication.propono.atom.server.AtomServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>AtomServlet</servlet-name> <url-pattern>/app/*</url-pattern> </servlet-mapping>
You'll need to specify the name of the file-based Atom factory in
propono.properties
. Here's an example:
com.sun.syndication.propono.atom.server.AtomHandlerFactory=\ com.sun.syndication.propono.atom.server.impl.FileBasedAtomHandlerFactory
If you put nothing else in the properties file, you'll have an Atom server that supports two collections: "entries" for Atom entries and "resources" for any type of file. If you'd like to setup a different set of collections then see the comments in {@link com.sun.syndication.propono.atom.server.impl.FileBasedAtomService} for details on configuring your own collections.
Start your webapp and point your Atom client at /app
to start using your new Atom server capability.