Dashboard > blojsom 3.0 > About blojsom > Template Dispatchers
  blojsom 3.0 Log In   View a printable version of the current page.  
  Template Dispatchers
Added by David Czarnecki, last edited by David Czarnecki on Jul 11, 2007  (view change)
Labels: 

Template dispatchers allow different presentation technologies to be used for composing pages that define the look and feel of your blog. The dispatcher handles loading of page templates and making available certain objects for you to use in your templates. blojsom's default installation comes with two different dispatchers, one for using JavaServer Pages (JSP) and one for using Velocity.

Configuring Dispatchers

Dispatchers are configured and referenced according to template suffix in the /WEB-INF/classes/blojsom.xml file. Accordingly, the bean ID for dispatchers must correspond to the suffix for templates that are to be served by a particular dispatcher. For example, in the following case, vm will serve Velocity templates:

<bean id="vm" class="org.blojsom.dispatcher.velocity.VelocityDispatcher" init-method="init">
        <property name="velocityProperties">
            <ref bean="defaultVelocityProperties"/>
        </property>
        <property name="blojsomProperties">
            <ref bean="defaultProperties"/>
        </property>
        <property name="servletConfig">
            <ref bean="servletConfigFactoryBean"/>
        </property>
    </bean>

Available Dispatchers

The following template dispatchers are included with blojsom.

Dispatcher Description
JSP Dispatcher Allows you to use JSP to define page templates for your blog.
Velocity Dispatcher Allows you to use Velocity to define page templates for your blog.

The following template dispatchers are included with the blojsom add-on bundle.

Freemarker Dispatcher Freemarker is an alternative to Velocity and this dispatcher allows you to use Freemarker to define page templates for your blog.
Groovy Dispatcher Groovy is an an agile dynamic language for Java and has a simple template engine that allows you to intermix Groovy when defining page templates for your blog.
WebMacro Dispatcher Allows you to use WebMacro to define page templates for your blog.
BSF Dispatcher Allows you to integrate multiple scripting languages using the Bean Scripting Framework to write templates for your blog.
BSF Dispatcher (blojsom 3.0)
Freemarker Dispatcher (blojsom 3.0)
Groovy Dispatcher (blojsom 3.0)
JSP Dispatcher (blojsom 3.0)
Velocity Dispatcher (blojsom 3.0)
WebMacro Dispatcher (blojsom 3.0)

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators