Struts Plugin

From: Joshua Pyle (joshua.t.pyl..mail.com)
Date: Mon May 16 2005 - 15:34:45 EDT

  • Next message: Gentry, Michael \(Contractor\): "RE: Compound expressions Problem and solution"

    Our web applications are struts based and we are using the following plugin.
     We thought the community migh find it usefull...
     Perhaps this could be added to the documentation? I did a saerch and could
    not find anythgin like it.
      
    package esolutions.struts;

    import javax.servlet.ServletException;

    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.apache.struts.action.ActionServlet;
    import org.apache.struts.action.PlugIn;
    import org.apache.struts.config.ModuleConfig;
    import org.objectstyle.cayenne.conf.BasicServletConfiguration;

    public class CayennePlugin implements PlugIn {

    private static Log _log = LogFactory.getLog(CayennePlugin.class);

    /* (non-Javadoc)
    *..ee org.apache.struts.action.PlugIn#destroy()
    */
    public void destroy() {
    _log.debug( this.getClass().getName() + " : destroy() called!");
    }

    /* (non-Javadoc)
    *..ee org.apache.struts.action.PlugIn#init(
    org.apache.struts.action.ActionServlet,
    org.apache.struts.config.ModuleConfig)
    */
    public void init(ActionServlet servlet, ModuleConfig config) throws
    ServletException {
    _log.debug( this.getClass().getName() + " : Initializing Cayenne
    configuration!");
    BasicServletConfiguration.initializeConfiguration(servlet.getServletContext
    ());
    _log.debug( this.getClass().getName() + " : Completed Cayenne
    configuration!");
    }

    }
    Here is what you would add to your struts-config.xml
      
    <plug-in className="esolutions.struts.CayennePlugin" />

    -- 
    Joshua T. Pyle
    Go has always existed.
    



    This archive was generated by hypermail 2.0.0 : Mon May 16 2005 - 15:34:46 EDT