Apache Struts API Documentation: Class RedeployableActionServlet

Apache Struts API


org.apache.struts.actions Class RedeployableActionServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.apache.struts.action.ActionServlet
                    |
                    +--org.apache.struts.actions.RedeployableActionServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RedeployableActionServlet
extends ActionServlet

WebLogic (at least v6 and v7) attempts to serialize the TilesRequestProcessor when re-deploying the Webapp in development mode. The TilesRequestProcessor is not serializable, and loses the Tiles definitions. This results in NullPointerException and/or NotSerializableException when using the app after automatic redeploy.

This bug report proposes a workaround for this problem, in the hope it will help others and maybe motivate an actual fix.

The attached class extends the Struts Action servlet and fixes the problem by reloading the Tiles definitions when they have disappeared.

For background discussion see http://issues.apache.org/bugzilla/show_bug.cgi?id=26322

Since:
1.2.1
Version:
$Rev: 54954 $ $Date: 2004-10-17 07:40:12 +0100 (Sun, 17 Oct 2004) $
See Also:
Serialized Form

Field Summary
private  TilesRequestProcessor tileProcessor
           
 
Fields inherited from class org.apache.struts.action.ActionServlet
config, configDigester, convertNull, dataSources, internal, internalName, log, processor, registrations, servletMapping, servletName
 
Fields inherited from class javax.servlet.http.HttpServlet
HEADER_IFMODSINCE, HEADER_LASTMOD, LSTRING_FILE, lStrings, METHOD_DELETE, METHOD_GET, METHOD_HEAD, METHOD_OPTIONS, METHOD_POST, METHOD_PUT, METHOD_TRACE
 
Constructor Summary
RedeployableActionServlet()
           
 
Method Summary
protected  RequestProcessor getRequestProcessor(ModuleConfig config)
          Look up and return the RequestProcessor responsible for the specified module, creating a new one if necessary.
 
Methods inherited from class org.apache.struts.action.ActionServlet
addRuleSets, addServletMapping, destroy, destroyConfigDigester, destroyInternal, destroyModules, doGet, doPost, getInternal, getModuleConfig, getProcessorForModule, handleConfigException, init, initConfigDigester, initInternal, initModuleConfig, initModuleConfigFactory, initModuleDataSources, initModuleMessageResources, initModulePlugIns, initModulePrefixes, initOther, initServlet, isValidating, parseModuleConfigFile, process
 
Methods inherited from class javax.servlet.http.HttpServlet
, doDelete, doHead, doOptions, doPut, doTrace, getAllDeclaredMethods, getLastModified, maybeSetLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

tileProcessor

private TilesRequestProcessor tileProcessor
Constructor Detail

RedeployableActionServlet

public RedeployableActionServlet()
Method Detail

getRequestProcessor

protected RequestProcessor getRequestProcessor(ModuleConfig config)
                                        throws javax.servlet.ServletException
Description copied from class: ActionServlet

Look up and return the RequestProcessor responsible for the specified module, creating a new one if necessary.

Overrides:
getRequestProcessor in class ActionServlet
Following copied from class: org.apache.struts.action.ActionServlet
Parameters:
config - The module configuration for which to acquire and return a RequestProcessor.
Throws:
javax.servlet.ServletException - if we cannot instantiate a RequestProcessor instance


Copyright © 2000-2005 - The Apache Software Foundation