Blogs Pebble Tomcat installation

Comparing Java based blogs (JRoller, Blojsom) and installing Pebble

I was looking for a simple Java based blooging software. I found the site http://www.java-source.net/open-source/bloggers a valuable resource.

I looked at Jroller and Blojsom first and was impressed by the feature list. But I stumbled over Pebble and decided for Pebble because the following reasons:

  1. Fast
  2. Easy to install
  3. Easily changeable templates
  4. No database required
  5. Spam protection with captchas
  6. Wysiwyg editor (http://www.fckeditor.net/)

Walk through of installation

Used versions:

  1. Tomcat 5.5
  2. Pebble 2.0.1

Download pebble from http://pebble.sourceforge.net/

Unzip the file.

If you want to use email notifications copy activation.jar and mail.jar from the pebble/lib directory to tomcat_home/common/lib and restart tomcat to load the libraries.

I wanted pebble to be available under the name blog and I prefer an exploded deployment as well.

Unzip the pebble.war, rename the directory from pebble to blog and copy it to tomcat_home/webapps
JNDI email service with javax.mal.Session

I only want to make the service available for the pebble application. Therefore, I created a folder blog/META-INF and created a context.xml file in this folder. In Tomcat >= 5.5 this will be loaded on startup of the application.

The content is:



In blog/WEB-INF/web.xml

uncommented the JNDI Session reference for mail
Pebble with Tomcat in Load balancing configuration

It is recommended to use multiple instances of Tomcat. Your site will stay available if one Tomcat is down and Tomcat runs in a JVM and a JVM does only fully load one CPU core. If you have multiple you should install multiple Tomcats.

I added the file

blog/WEB-INF/applicationContext-pebble.xml and defined a common directory. Do not forget to create the directory as well.




By default Pebble will discover your URL. I use the Apache webserver in front of my Tomcats. One Tomcat is runing on port xyz and the other on another port.

Pebble discovers the xyz port and builds any links like the following:

http://www.laliluna.de:xyz/blog

This is not what I want and therefore I had to set the following in my blog/WEB-INF/applicationContext-pebble.xml




That’s it. Start Tomcat.

Note:

The stylessheets are not taken from the data dictionary but from the deployed folders.
Enable email notification

Open the plugin dialogue and uncomment the Comment listener and the Trackback listener net.sourceforge.pebble.event.comment.EmailAuthorNotificationListener

net.sourceforge.pebble.event.trackback.EmailAuthorNotificationListener
Some security efforts for Pebble

Login with the default user (user = username, password = password) Create a new user and assign him all roles. Login with the new user (first password = password). Delete the default account.

Change the user rights in all used pebble directories to your tomcat user.
Spam protection

Open the plugin page. I use image captchas to prevent spam. I added it in comment and trackbar confirmation strategy.

net.sourceforge.pebble.confirmation.ImageCaptchaConfirmationStrategy

Click on the help button in the plugin dialogue for further information.

Captcha a simple definition:
A captcha shows a word which can only be recognized by a human being and which have to be input as confirmation. A spam robot cannot pass over a captcha (hopefully ;-) )

Notes

Simon, thank you for this nice software

Comment from Simon Brown on May 10, 2007 1:43:14 PM CEST #

You’re welcome. :-)

Comment from Ulrich on November 4, 2007 4:05:03 PM CET #

Thank you for this great article. I found it through Google and it helped a lot to set up e-mail notifications.