About this Guide

This User Guide is intended to help those who want to integrate MadCaching into their new or existing project.

Downloading MadCaching

If you have not already done so, download a distibution MadCaching file. And unzip or untar in a temporary directory.

MadCaching distribution directory structure

You should have the following directory structure after unzip or untar the distribution file.

    lib/               <--- Contains the madcaching-0.5.jar file required to enable madcaching.
    webapp/            <--- Configuration files and sample required to enable madcaching.
    LICENSE.txt        <--- The License for MadCaching.

Quick Start Guide

This is a Quick Start Guide for new and existing Struts and Tiles project. If you starting a new project, copy a blank project from Struts.

Copy webapp files

Copy all the files in the webapp directory to your project web application.

Configure web.xml

Edit the web.xml file with your favorite editor. In the servlet section add the following init-param.


Change the struts-tiles taglib to point to struts-cachetiles.tld.


Configure struts-config.xml

Edit the struts-config.xml file with your favorite editor. Modify the controller to the following.

    <controller processorClass="com.macvu.tiles.CacheTilesRequestProcessor"/>

Change the TilesPlugin configuration to the following:

<plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-factory-class" value="com.macvu.tiles.xmlDefinition.CacheI18nFactorySet"/>
    <set-property property="definitions-config"
    <set-property property="definitions-parser-validate" value="false"/>

You can add an action forward to madcaching manager.

<action path="/madcaching"

Note on security

You should add security configuration to only allow administrator to access the madcaching path.