org.apache.jcs.config.plugins
Class JCSStrutsPlugin

java.lang.Object
  extended byorg.apache.jcs.config.plugins.JCSStrutsPlugin
All Implemented Interfaces:
org.apache.struts.action.PlugIn

public class JCSStrutsPlugin
extends java.lang.Object
implements org.apache.struts.action.PlugIn

This plugin provides a simple way to integrate with Struts. It allows you to specify the configuration file for JCS in the struts-config.xml file. JCS will initialize and be destroyed at applicatiohn shutdown. Add these lines to your struts-config.xml


Constructor Summary
JCSStrutsPlugin()
           
 
Method Summary
 void destroy()
          Destroys all the regions.
 void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config)
          Initialize JCS with config-file-name param.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCSStrutsPlugin

public JCSStrutsPlugin()
Method Detail

init

public void init(org.apache.struts.action.ActionServlet servlet,
                 org.apache.struts.config.ModuleConfig config)
          throws javax.servlet.ServletException
Initialize JCS with config-file-name param. If no file is specified, cache.ccf will be used.

Specified by:
init in interface org.apache.struts.action.PlugIn
Parameters:
servlet - ActionServlet
config - ModuleConfig
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Destroys all the regions.

Specified by:
destroy in interface org.apache.struts.action.PlugIn


Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.