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

Description

The JSP dispatcher allows you to use JSPs as templates for your blog.

Installation and Configuration

In your /WEB-INF/classes/blojsom.xml file, add the following:

<bean id="jsp" class="org.blojsom.dispatcher.jsp.JSPDispatcher" init-method="init">
        <property name="blojsomProperties">
            <ref bean="defaultProperties"/>
        </property>
        <property name="servletConfig">
            <ref bean="servletConfigFactoryBean"/>
        </property>
    </bean>

The defaultProperties bean should already be configured.

<bean id="defaultProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="properties">
            <props>
                <prop key="default-blog">default</prop>
                <prop key="ignore-flavors">admin, rsd</prop>
                <prop key="installed-locales">de, en, fr, jp, ko, pt_BR, sv, zh_CN</prop>
                <prop key="resources-directory">/resources/</prop>
                <prop key="templates-directory">/templates/</prop>
                <prop key="themes-directory">/themes/</prop>
                <prop key="blogs-directory">/blogs/</prop>
                <prop key="bootstrap-directory">/bootstrap/</prop>
            </props>
        </property>
    </bean>
Security Consideration

JSP allows you to embed arbitrary Java code in your templates. As such, potentially malicious code could be executed within a template. Remove this bean reference if you are uncomfortable allowing your users this capability.

Usage

You can find a reference for the JSP 2.0 Syntax online.

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