DavCache - CMS Sample
The DavCache distribution includes a very simple CMS example.
It consists of just one JSP, /cms/index.jsp inside the webapp, so it is nowhere near a real world CMS application. Its aim is just to give you an idea of how DavCache could be used as a base for a proper Content Management System.
After you have started DavCache in either JBoss or Tomcat, the CMS sample will be visible at
http://localhost:8080/davcache/cms/
The JSP defines a simple layout with a menu panel on the left and the current page title and content on the rest of the page.
Unsurprisingly, no content will be displayed unless you add some. Pages can be added as simple HTML files to the (guess what?) WebDAV storage accessible at
http://localhost:8080/davcache/dav/
using your favourite WebDAV client (e.g. Windows Explorer).
Here's how to add some pages
Create a local file Home.html containing some simple HTML, such as
Welcome to the <b>home</b> page!
Copy Home.html to the WebDAV location
Refresh the CMS sample in your browser
Your home page now has some content
Create some other pages, say Page++One.html containining
Welcome to the <b>first</b> page!
and Page++Two.html containing
Welcome to the <b>second</b> page!
Copy the new pages to the WebDAV location
Refresh the CMS sample in your browser
The menu has been automatically populated with links to all the available pages
Have a look at /cms/index.jsp in the DavCache webapp to see how it works. It is quite simple.
Comments