org.apache.struts.actions

Class RedeployableActionServlet


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

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

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

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, getRequestProcessor, handleConfigException, init, initConfigDigester, initInternal, initModuleConfig, initModuleConfigFactory, initModuleDataSources, initModuleMessageResources, initModulePlugIns, initModulePrefixes, initOther, initServlet, isValidating, parseModuleConfigFile, process

Field Details

tileProcessor

private TilesRequestProcessor tileProcessor

Method Details

getRequestProcessor

protected RequestProcessor getRequestProcessor(ModuleConfig config)
            throws ServletException
Look up and return the RequestProcessor responsible for the specified module, creating a new one if necessary.
Overrides:
getRequestProcessor in interface ActionServlet
Parameters:
config - The module configuration for which to acquire and return a RequestProcessor.
Since:
Struts 1.1

Copyright B) 2000-2007 - The Apache Software Foundation