RedeployableActionServlet (Struts 1.3.10 API)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.tiles
Class RedeployableActionServlet

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              org.apache.struts.action.ActionServlet
                  org.apache.struts.tiles.RedeployableActionServlet

All Implemented Interfaces:
  Serializable, 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: 481833 $ $Date: 2006-12-03 11:32:52 -0600 (Sun, 03 Dec 2006) $
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.struts.action.ActionServlet
`chainConfig, config, configDigester, convertNull, internal, internalName, log, registrations, servletMapping, servletName`

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
`addServletMapping, destroy, destroyConfigDigester, destroyInternal, destroyModules, doGet, doPost, getInternal, getModuleConfig, init, initChain, initConfigDigester, initInternal, initModuleActions, initModuleConfig, initModuleConfigFactory, initModuleExceptionConfigs, initModuleFormBeans, initModuleForwards, initModuleMessageResources, initModulePlugIns, initModulePrefixes, initOther, initServlet, parseModuleConfigFile, parseModuleConfigFile, process, processActionConfigClass, processActionConfigExtension, processExceptionConfigClass, processExceptionExtension, processFormBeanConfigClass, processFormBeanExtension, processForwardConfigClass, processForwardExtension, splitAndResolvePaths`

Methods inherited from class javax.servlet.http.HttpServlet
`doDelete, doHead, doOptions, doPut, doTrace, getLastModified, 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, toString, wait, wait, wait`

Constructor Detail

### RedeployableActionServlet

    public RedeployableActionServlet()

Method Detail

### getRequestProcessor

    protected RequestProcessor getRequestProcessor(ModuleConfig config)
                                            throws 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`
  Parameters:
    `config` - The module configuration for which to acquire and return a RequestProcessor.
  Returns:
    The `RequestProcessor` responsible for the specified module,
  Throws:
    `ServletException` - If we cannot instantiate a RequestProcessor instance a `UnavailableException` is thrown, meaning your application is not loaded and will not be available.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.