INSTALLATION

Struts 1.1

Download the latest actioncache-1.1.x release and add the following lines to your struts config file(s):

<struts-config>

    <!-- Just an example action -->
    <action-mappings>
        <action path="/index" type="de.neteye.actioncache.ExampleAction" />
    </action-mappings>

    <plug-in className="de.neteye.actioncache.ActionCachePlugIn" >
        <set-property property="capacity" value="1024" />
        <!-- Optional tiles support: -->
        <set-property
                property="processorClass"
                value="de.neteye.actioncache.TilesCacheRequestProcessor" />
    </plug-in>

</struts-config>

Struts 1.0

Download the latest actioncache.1.0.x release and add the following lines to your web.xml:

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>de.neteye.actioncache.ActionCacheServlet</servlet-class>

    <init-param>
        <param-name>cacheCapacity</param-name>
        <param-value>1024</param-value>
    </init-param>
 
    <init-param>
        <param-name>cacheDirectory</param-name>
        <param-value>/var/tomcat/work/myapp/cache</param-value>
    </init-param>
    
    <!--Insert your struts init parameters here...-->

</servlet>

In other words just replace the servlet-class org.apache.struts.action.ActionServlet with de.neteye.actioncache.ActionCacheServlet. The PersistenceListener is optional - it will save the cache state when the servlet container is shut down.

Building from source

To build actioncache from source you need the Jakarta Ant Build Tool. Put the struts.jar into the lib directory and call ant -projecthelp for a list of available build targets.


digital handcraft made in hamburg/berlin