Table of Contents

SourceForge Logo

What is CocoBlog?

CocoBlog is a free weblogging software tool based on Apache Cocoon and Apache Xindice.

At the moment it is able to manage a single-user weblog, stored in an XML repository and publish it via Cocoon. The use of Cocoon allows to obtain a nice separation of content and presentation, so that the appearance of the pages is entirely determined by XSLT stylesheets.

What it mostly lacks is a decent editing and management subsystem. Contributions in this area are especially welcomed.

CocoBlog is an Open Source product, distributed under the Apache Software License.

License

The Apache Software License, Version 1.1

Copyright (C) 2002 Ugo Cei. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed for the project CocoBlog (http://www.beblogging.com/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear.
  4. The name "CocoBlog" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact u.cei@cbim.it.
  5. Products derived from this software may not be called "CocoBlog", nor may "CocoBlog" appear in their name, without prior written permission of Ugo Cei.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UGO CEI OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/).

Prerequisites

First of all, you need to install a Java 2 development kit for your operating system. CocoBlog has been verified to work with Sun's J2SE SDK 1.3.1 on Solaris and Linux. It should work with version 1.2.2 also, but you are sure to run into troubles with 1.4.0. Yous shouldn't have problems under Windows or any other operating system where a decent Java 2 SDK is available.

Then you need a Java Servlet container that supports version 2.2 of the Servlet spec. If you don't have a servlet engine installed, well, stop right here and go to the Apache Tomcat project, then come back when you are done. I suggest that you either use version 4.0.1 (tested) or 4.0.4 (not tested). You could run into troubles by using either 4.0.2 or 4.0.3.

Last thing you need is Apache Xindice. Grab version 1.0 and install it. You may install it on a different machine than the one you are running Tomcat on, as long as the latter can connect to the former via the network.

Once you have installed Xindice and have it running, create a new collection under the default /db collection, called rssblog with this command:

    xindiceadmin ac -c /db -n rssblog
    

If you want to enable syndication of external feeds, create another collection under the default /db collection, called syndicate with this command:

    xindiceadmin ac -c /db -n syndicate
    

Configuration

After having downloaded and uncompressed the latest distribution, cd to the new folder and edit the build.properties file. There you should set values for the following properties:

base.url

The URL where the blog will be published. Defaults to http://localhost:8080/blog/. Should end with a slash.

blog.title

The title of the blog. A very short phrase that will appear as a heading in all the HTML pages, in the <title> tag and in the RSS feeds.

blog.desc

The description of the blog. A short phrase that will appear as a heading in the HTML pages and in the RSS feeds.

xmldb.url

The URL of the Xindice collection. Defaults to xmldb:xindice://localhost:4080/db/rssblog.

xmldb.syndicate.url

The URL of the Xindice collection used for syndication. Defaults to xmldb:xindice://localhost:4080/db/syndicate.

mail.user

The username part of the mail address of the blog owner. The part that comes before the '@'.

mail.host

The domainname part of the mail address of the blog owner. The part that comes after the '@'.

owner.name

The full name of the blog owner.

google.key

Your Google Web API key. If you want Google searches to work, you need to register at Google to obtain a valid key.

Compilation and installation

The compilation uses Jakarta Ant, which is already provided in the distribution. You should be able to create a working web application with this command:

    tools/jakarta-ant-1.4.1/bin/ant war
    

If the build is successful, you should have a file called blog.war in the build folder. Copy it to the webapps folder contained in the one where you installed Tomcat, restart Tomcat and point your browser to http://localhost:8080/blog/ or equivalent and you should be all set.

Administration

CocoBlog is configured by default to protect the administrative functions like posting, editing and managing syndicated feeds. All these functions are available under the /admin URL path.

In order to access this path, you have to define one or more users having a role of blogger. If you are using Jakarta Tomcat, add the following line to the file conf/tomcat-users.xml:

<user name="myusername" password="mypassword" roles="blogger"/>
    

Publishing with CocoBlog

In order to publish a new item, invoke this URL: http://localhost:8080/blog/admin/newentry or equivalent. Fill in the form with the title of the item, its content and possibly a list of comma separated keywords.

The content must be inserted between the existing <text> and </text> tags and must be well-formed XML, but should really be valid XHTML.

It is advised that the first element of your item be a paragraph (<p> ... </p>) element.

If one or more keywords are present, their presence will make the "Google It" link appear beneath the item whenever it is displayed.

If the submission is well-formed, you will get a blank page as a response, otherwise you will get an error page detailing the cause of the error. No validity check is performed at the moment.

Remeber to include all your text between XHTML tags. All "naked" text won't be saved.

At this moment, there is no provision for editing or deleting an item, so be very careful.

Syndication

The current version of CocoBlog includes a limited support for syndication of external RSS feeds. In order to make syndication work, first make sure you created the /db/syndication collection, as explained in the Prerequisites section.

Next, point your browser at http://localhost:8080/blog/admin/listfeeds or equivalent. Input the URL of a valid RSS 1.0 feed (try http://www.beblogging.com/blog/index.rss) in the textbox and press the "Add URL" button. If the feed is OK, you should see it's contents. Change the title and description, if you feel like, and press "Add".

From now on, the title of the feed should appear in the sidebar and you can access its contents by clicking on it.

Limitations

Happy blogging!

Top of page