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.action
Class ActionServlet

    java.lang.Object
      |
      +--javax.servlet.GenericServlet
            |
            +--javax.servlet.http.HttpServlet
                  |
                  +--org.apache.struts.action.ActionServlet

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Direct Known Subclasses:
  ActionComponentServlet

public class ActionServlet
extends javax.servlet.http.HttpServlet

ActionServlet represents the "controller" in the Model-View-Controller (MVC) design pattern for web applications that is commonly known as "Model 2". This nomenclature originated with a description in the JavaServerPages Specification, version 0.92, and has persisted ever since (in the absence of a better name).

Generally, a "Model 2" application is architected as follows:

- The user interface will generally be created with JSP pages, which will not themselves contain any business logic. These pages represent the "view" component of an MVC architecture.
- Forms and hyperlinks in the user interface that require business logic to be executed will be submitted to a request URI that is mapped to the controller servlet.
- There will be one instance of this servlet class, which receives and processes all requests that change the state of a user's interaction with the application. This component represents the "controller" component of an MVC architecture.
- The controller servlet will select and invoke an action class to perform the requested business logic.
- The action classes will manipulate the state of the application's interaction with the user, typically by creating or modifying JavaBeans that are stored as request or session attributes (depending on how long they need to be available). Such JavaBeans represent the "model" component of an MVC architecture.
- Instead of producing the next page of the user interface directly, action classes will generally use the `RequestDispatcher.forward()` facility of the servlet API to pass control to an appropriate JSP page to produce the next page of the user interface.

The standard version of `ActionServlet` implements the following logic for each incoming HTTP request. You can override some or all of this functionality by subclassing this servlet and implementing your own version of the processing.

- Identify, from the incoming request URI, the substring that will be used to select an action procedure.
- Use this substring to map to the Java class name of the corresponding action class (an implementation of the `Action` interface).
- If this is the first request for a particular action class, instantiate an instance of that class and cache it for future use.
- Optionally populate the properties of an `ActionForm` bean associated with this mapping.
- Call the `execute` method of this action class, passing on a reference to the mapping that was used (thereby providing access to the underlying ActionServlet and ServletContext, as well as any specialized properties of the mapping itself), and the request and response that were passed to the controller by the servlet container.

The standard version of `ActionServlet` is configured based on the following servlet initialization parameters, which you will specify in the web application deployment descriptor (`/WEB-INF/web.xml`) for your application. Subclasses that specialize this servlet are free to define additional initialization parameters. Several of these were deprecated between the 1.0 and 1.1 releases. The deprecated parameters are listed after the nominal parameters.

- config - Comma-separated list of context-relative path(s) to the XML resource(s) containing the configuration information for the default module. (Multiple files support since Struts 1.1) [/WEB-INF/struts-config.xml].
- config/${module} - Comma-separated list of Context-relative path(s) to the XML resource(s) containing the configuration information for the module that will use the specified prefix (/${module}). This can be repeated as many times as required for multiple modules. (Since Struts 1.1)
- convertNull - Force simulation of the Struts 1.0 behavior when populating forms. If set to true, the numeric Java wrapper class types (like `java.lang.Integer`) will default to null (rather than 0). (Since Struts 1.1) [false]
- rulesets - Comma-delimited list of fully qualified classnames of additional `org.apache.commons.digester.RuleSet` instances that should be added to the `Digester` that will be processing `struts-config.xml` files. By default, only the `RuleSet` for the standard configuration elements is loaded. (Since Struts 1.1)
- validating - Should we use a validating XML parser to process the configuration file (strongly recommended)? [true]

The following parameters may still be used with the Struts 1.1 release but are deprecated.

- application - Java class name of the application resources bundle base class. [NONE] DEPRECATED - Configure this using the "parameter" attribute of the <message-resources> element.
- bufferSize - The size of the input buffer used when processing file uploads. [4096] DEPRECATED - Configure this using the "bufferSize" attribute of the <controller> element.
- content - Default content type and character encoding to be set on each response; may be overridden by a forwarded-to servlet or JSP page. [text/html] DEPRECATED - Configure this using the "contentType" attribute of the <controller> element.
- debug - TThe debugging detail level that controls how much information is logged for this servlet. Accepts values 0 (off) and from 1 (least serious) through 6 (most serious). [0] DEPRECATED - Configure the logging detail level in your underlying logging implementation.
- factory - The Java class name of the `MessageResourcesFactory` used to create the application `MessageResources` object. [org.apache.struts.util.PropertyMessageResourcesFactory] DEPRECATED - Configure this using the "factory" attribute of the <message-resources> element.
- formBean - The Java class name of the ActionFormBean implementation to use [org.apache.struts.action.ActionFormBean]. DEPRECATED - Configure this using the "className" attribute of each <form-bean> element.
- forward - The Java class name of the ActionForward implementation to use [org.apache.struts.action.ActionForward]. Two convenient classes you may wish to use are:
  - org.apache.struts.action.ForwardingActionForward - Subclass of `org.apache.struts.action.ActionForward` that defaults the `redirect` property to `false` (same as the ActionForward default value).
  - org.apache.struts.action.RedirectingActionForward - Subclass of `org.apache.struts.action.ActionForward` that defaults the `redirect` property to `true`.
  DEPRECATED - Configure this using the "className" attribute of each <forward> element.
- locale - If set to `true`, and there is a user session, identify and store an appropriate `java.util.Locale` object (under the standard key identified by `Globals.LOCALE_KEY`) in the user's session if there is not a Locale object there already. [true] DEPRECATED - Configure this using the "locale" attribute of the <controller> element.
- mapping - The Java class name of the ActionMapping implementation to use [org.apache.struts.action.ActionMapping]. Two convenient classes you may wish to use are:
  - org.apache.struts.action.RequestActionMapping - Subclass of `org.apache.struts.action.ActionMapping` that defaults the `scope` property to "request".
  - org.apache.struts.action.SessionActionMapping - Subclass of `org.apache.struts.action.ActionMapping` that defaults the `scope` property to "session". (Same as the ActionMapping default value).
  DEPRECATED - Configure this using the "className" attribute of each <action> element, or globally for a module by using the "type" attribute of the <action-mappings> element.
- maxFileSize - The maximum size (in bytes) of a file to be accepted as a file upload. Can be expressed as a number followed by a "K" "M", or "G", which are interpreted to mean kilobytes, megabytes, or gigabytes, respectively. [250M] DEPRECATED - Configure this using the "maxFileSize" attribute of the <controller> element.
- multipartClass - The fully qualified name of the MultipartRequestHandler implementation class to be used for processing file uploads. If set to `none`, disables Struts multipart request handling. [org.apache.struts.upload.CommonsMultipartRequestHandler] DEPRECATED - Configure this using the "multipartClass" attribute of the <controller> element.
- nocache - If set to `true`, add HTTP headers to every response intended to defeat browser caching of any response we generate or forward to. [false] DEPRECATED - Configure this using the "nocache" attribute of the <controller> element.
- null - If set to `true`, set our application resources to return `null` if an unknown message key is used. Otherwise, an error message including the offending message key will be returned. [true] DEPRECATED - Configure this using the "null" attribute of the <message-resources> element.
- tempDir - The temporary working directory to use when processing file uploads. [The working directory provided to this web application as a servlet context attribute] DEPRECATED - Configure this using the "tempDir" attribute of the <controller> element.

Version:
  $Revision: 1.1 $ $Date: 2003/08/22 08:14:18 $
Author:
  Craig R. McClanahan, Ted Husted, Martin Cooper, David Graham
See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `config` Comma-separated list of context-relative path(s) to our configuration resource(s) for the default module.
`protected org.apache.commons.digester.Digester` | `configDigester` The Digester used to produce ModuleConfig objects from a Struts configuration file.
`protected boolean` | `convertNull` The flag to request backwards-compatible conversions for form bean properties of the Java wrapper class types.
`protected org.apache.commons.collections.FastHashMap` | `dataSources` The JDBC data sources that has been configured for this module, if any, keyed by the servlet context attribute under which they are stored.
`protected int` | `debug` Deprecated.
`protected MessageResources` | `internal` The resources object for our internal resources.
`protected java.lang.String` | `internalName` The Java base name of our internal resources.
`protected static org.apache.commons.logging.Log` | `log` Commons Logging instance.
`protected RequestProcessor` | `processor` The `RequestProcessor` instance we will use to process all incoming requests.
`protected java.lang.String[]` | `registrations` The set of public identifiers, and corresponding resource names, for the versions of the configuration file DTDs that we know about.
`protected java.lang.String` | `servletMapping` The URL pattern to which we are mapped in our web application deployment descriptor.
`protected java.lang.String` | `servletName` The servlet name under which we are registered in our web application deployment descriptor.

Fields inherited from class javax.servlet.http.HttpServlet
``

Constructor Summary
`ActionServlet()`

Method Summary
`void` | `addServletMapping(java.lang.String servletName, java.lang.String urlPattern)` Remember a servlet mapping from our web application deployment descriptor, if it is for this servlet.
`private void` | `defaultControllerConfig(ModuleConfig config)` Deprecated. Will be removed in a release after Struts 1.1.
`private void` | `defaultFormBeansConfig(ModuleConfig config)` Deprecated. Will be removed in a release after Struts 1.1.
`private void` | `defaultForwardsConfig(ModuleConfig config)` Deprecated. Will be removed in a release after Struts 1.1.
`private void` | `defaultMappingsConfig(ModuleConfig config)` Deprecated. Will be removed in a release after Struts 1.1.
`private void` | `defaultMessageResourcesConfig(ModuleConfig config)` Deprecated. Will be removed in a release after Struts 1.1.
`void` | `destroy()` Gracefully shut down this controller servlet, releasing any resources that were allocated at initialization.
`protected void` | `destroyApplications()` Deprecated. replaced by destroyModules()
`protected void` | `destroyConfigDigester()` Gracefully release any configDigester instance that we have created.
`protected void` | `destroyDataSources()` Deprecated. Will no longer be required with module support
`protected void` | `destroyInternal()` Gracefully terminate use of the internal MessageResources.
`protected void` | `destroyModules()` Gracefully terminate use of any modules associated with this application (if any).
`void` | `doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Process an HTTP "GET" request.
`void` | `doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Process an HTTP "POST" request.
`javax.sql.DataSource` | `findDataSource(java.lang.String key)` Deprecated. Look up data sources directly in servlet context attributes
`ActionFormBean` | `findFormBean(java.lang.String name)` Deprecated. Replaced by ModuleConfig.findFormBeanConfig()
`ActionForward` | `findForward(java.lang.String name)` Deprecated. Replaced by ModuleConfig.findForwardConfig()
`ActionMapping` | `findMapping(java.lang.String path)` Deprecated. Replaced by ModuleConfig.findActionConfig()
`protected ApplicationConfig` | `getApplicationConfig(javax.servlet.http.HttpServletRequest request)` Deprecated. use `getModuleConfig(HttpServletRequest)`
`int` | `getDebug()` Deprecated. Configure the logging detail level in your underlying logging implementation
`MessageResources` | `getInternal()` Return the `MessageResources` instance containing our internal message strings.
`protected ModuleConfig` | `getModuleConfig(javax.servlet.http.HttpServletRequest request)` Return the module configuration object for the currently selected module.
`protected RequestProcessor` | `getRequestProcessor(ModuleConfig config)` Look up and return the `RequestProcessor` responsible for the specified module, creating a new one if necessary.
`MessageResources` | `getResources()` Deprecated. Actions should call Action.getResources(HttpServletRequest) instead of this method, in order to retrieve the resources for the current module.
`private void` | `handleConfigException(java.lang.String paths, java.lang.Exception e)` Simplifies exception handling in the parseModuleConfigFile() method.
`void` | `init()` Initialize this servlet.
`protected ApplicationConfig` | `initApplicationConfig(java.lang.String prefix, java.lang.String path)` Deprecated. use `initModuleConfig(String,String)`
`protected void` | `initApplicationDataSources(ModuleConfig config)` Deprecated. use initModuleDataSources(ModuleConfig)
`protected void` | `initApplicationMessageResources(ModuleConfig config)` Deprecated. use initModuleMessageResources()
`protected void` | `initApplicationPlugIns(ModuleConfig config)` Deprecated. use `initModulePlugIns(ModuleConfig)`
`protected org.apache.commons.digester.Digester` | `initConfigDigester()` Create (if needed) and return a new Digester instance that has been initialized to process Struts module configuraiton files and configure a corresponding ModuleConfig object (which must be pushed on to the evaluation stack before parsing begins).
`protected void` | `initDataSources()` Deprecated. Replaced by initApplicationDataSources() that takes an ModuleConfig argument. This method does nothing.
`protected void` | `initInternal()` Initialize our internal MessageResources bundle.
`protected ModuleConfig` | `initModuleConfig(java.lang.String prefix, java.lang.String paths)` Initialize the application configuration information for the specified module.
`protected void` | `initModuleDataSources(ModuleConfig config)` Initialize the data sources for the specified module.
`protected void` | `initModuleMessageResources(ModuleConfig config)` Initialize the application MessageResources for the specified module.
`protected void` | `initModulePlugIns(ModuleConfig config)` Initialize the plug ins for the specified module.
`protected void` | `initOther()` Initialize other global characteristics of the controller servlet.
`protected void` | `initServlet()` Initialize the servlet mapping under which our controller servlet is being accessed.
`void` | `log(java.lang.String message, int level)` Deprecated. Use commons-logging instead.
`private void` | `parseModuleConfigFile(java.lang.String prefix, java.lang.String paths, ModuleConfig config, org.apache.commons.digester.Digester digester, java.lang.String path)` Parses one module config file.
`protected void` | `process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Perform the standard request processing for this request, and create the corresponding response.

Methods inherited from class javax.servlet.http.HttpServlet
`doDelete, 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`

Field Detail

### config

    protected java.lang.String config

  Comma-separated list of context-relative path(s) to our configuration resource(s) for the default module.

### configDigester

    protected org.apache.commons.digester.Digester configDigester

  The Digester used to produce ModuleConfig objects from a Struts configuration file.

  Since:
    Struts 1.1

### convertNull

    protected boolean convertNull

  The flag to request backwards-compatible conversions for form bean properties of the Java wrapper class types.

  Since:
    Struts 1.1

### dataSources

    protected org.apache.commons.collections.FastHashMap dataSources

  The JDBC data sources that has been configured for this module, if any, keyed by the servlet context attribute under which they are stored.

### debug

    protected int debug

  Deprecated.

  The debugging detail level for this servlet.

### internal

    protected MessageResources internal

  The resources object for our internal resources.

### internalName

    protected java.lang.String internalName

  The Java base name of our internal resources.

  Since:
    Struts 1.1

### log

    protected static org.apache.commons.logging.Log log

  Commons Logging instance.

  Since:
    Struts 1.1

### processor

    protected RequestProcessor processor

  The `RequestProcessor` instance we will use to process all incoming requests.

  Since:
    Struts 1.1

### registrations

    protected java.lang.String[] registrations

  The set of public identifiers, and corresponding resource names, for the versions of the configuration file DTDs that we know about. There MUST be an even number of Strings in this list!

### servletMapping

    protected java.lang.String servletMapping

  The URL pattern to which we are mapped in our web application deployment descriptor. FIXME - multiples???

### servletName

    protected java.lang.String servletName

  The servlet name under which we are registered in our web application deployment descriptor.

Constructor Detail

### ActionServlet

    public ActionServlet()

Method Detail

### destroy

    public void destroy()

  Gracefully shut down this controller servlet, releasing any resources that were allocated at initialization.

  Specified by:
    `destroy` in interface `javax.servlet.Servlet`
  Overrides:
    `destroy` in class `javax.servlet.GenericServlet`

### init

    public void init()
              throws javax.servlet.ServletException

  Initialize this servlet. Most of the processing has been factored into support methods so that you can override particular functionality at a fairly granular level.

  Overrides:
    `init` in class `javax.servlet.GenericServlet`
  Throws:
    `javax.servlet.ServletException` - if we cannot configure ourselves correctly

### doGet

    public void doGet(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws java.io.IOException,
                      javax.servlet.ServletException

  Process an HTTP "GET" request.

  Overrides:
    `doGet` in class `javax.servlet.http.HttpServlet`
  Parameters:
    `request` - The servlet request we are processing
    `response` - The servlet response we are creating
  Throws:
    `java.io.IOException` - if an input/output error occurs
    `javax.servlet.ServletException` - if a servlet exception occurs

### doPost

    public void doPost(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.io.IOException,
                       javax.servlet.ServletException

  Process an HTTP "POST" request.

  Overrides:
    `doPost` in class `javax.servlet.http.HttpServlet`
  Parameters:
    `request` - The servlet request we are processing
    `response` - The servlet response we are creating
  Throws:
    `java.io.IOException` - if an input/output error occurs
    `javax.servlet.ServletException` - if a servlet exception occurs

### addServletMapping

    public void addServletMapping(java.lang.String servletName,
                                  java.lang.String urlPattern)

  Remember a servlet mapping from our web application deployment descriptor, if it is for this servlet.

  Parameters:
    `servletName` - The name of the servlet being mapped
    `urlPattern` - The URL pattern to which this servlet is mapped

### findDataSource

    public javax.sql.DataSource findDataSource(java.lang.String key)

  Deprecated. Look up data sources directly in servlet context attributes

  Return a JDBC data source associated with this module, if any.

  Parameters:
    `key` - The servlet context attribute key under which this data source is stored, or `null` for the default.

### findFormBean

    public ActionFormBean findFormBean(java.lang.String name)

  Deprecated. Replaced by ModuleConfig.findFormBeanConfig()

  Return the form bean definition associated with the specified logical name, if any; otherwise return `null`.

  Parameters:
    `name` - Logical name of the requested form bean definition

### findForward

    public ActionForward findForward(java.lang.String name)

  Deprecated. Replaced by ModuleConfig.findForwardConfig()

  Return the forwarding associated with the specified logical name, if any; otherwise return `null`.

  Parameters:
    `name` - Logical name of the requested forwarding

### findMapping

    public ActionMapping findMapping(java.lang.String path)

  Deprecated. Replaced by ModuleConfig.findActionConfig()

  Return the ActionMapping for the specified path, for the default module.

  Parameters:
    `path` - Request path for which a mapping is requested

### getDebug

    public int getDebug()

  Deprecated. Configure the logging detail level in your underlying logging implementation

  Return the debugging detail level for this servlet.

### getInternal

    public MessageResources getInternal()

  Return the `MessageResources` instance containing our internal message strings.

  Since:
    Struts 1.1

### getResources

    public MessageResources getResources()

  Deprecated. Actions should call Action.getResources(HttpServletRequest) instead of this method, in order to retrieve the resources for the current module.

  Return the application resources for the default module, if any.

### log

    public void log(java.lang.String message,
                    int level)

  Deprecated. Use commons-logging instead.

  Log the specified message if the current debugging detail level for this servlet has been set to an equal or higher value. Otherwise, ignore this message.

  Parameters:
    `message` - Message to be logged
    `level` - Debugging detail level of this message

### destroyApplications

    protected void destroyApplications()

  Deprecated. replaced by destroyModules()

  Gracefully terminate use of any modules associated with this application (if any).

  Since:
    Struts 1.1

### destroyModules

    protected void destroyModules()

  Gracefully terminate use of any modules associated with this application (if any).

  Since:
    Struts 1.1

### destroyConfigDigester

    protected void destroyConfigDigester()

  Gracefully release any configDigester instance that we have created.

  Since:
    Struts 1.1

### destroyDataSources

    protected void destroyDataSources()

  Deprecated. Will no longer be required with module support

  Gracefully terminate use of the data source associated with this application (if any).

### destroyInternal

    protected void destroyInternal()

  Gracefully terminate use of the internal MessageResources.

### getApplicationConfig

    protected ApplicationConfig getApplicationConfig(javax.servlet.http.HttpServletRequest request)

  Deprecated. use `getModuleConfig(HttpServletRequest)`

  Return the module configuration object for the currently selected module.

  Parameters:
    `request` - The servlet request we are processing
  Since:
    Struts 1.1

### getModuleConfig

    protected ModuleConfig getModuleConfig(javax.servlet.http.HttpServletRequest request)

  Return the module configuration object for the currently selected module.

  Parameters:
    `request` - The servlet request we are processing
  Since:
    Struts 1.1

### getRequestProcessor

    protected RequestProcessor getRequestProcessor(ModuleConfig config)
                                            throws javax.servlet.ServletException

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

  Parameters:
    `config` - The module configuration for which to acquire and return a RequestProcessor.
  Throws:
    `javax.servlet.ServletException` - if we cannot instantiate a RequestProcessor instance
  Since:
    Struts 1.1

### initApplicationConfig

    protected ApplicationConfig initApplicationConfig(java.lang.String prefix,
                                                      java.lang.String path)
                                               throws javax.servlet.ServletException

  Deprecated. use `initModuleConfig(String,String)`

  Initialize the application configuration information for the specified module.

  Parameters:
    `prefix` - Module prefix for this module
    `path` - Context-relative resource path for this modules's configuration resource
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### initModuleConfig

    protected ModuleConfig initModuleConfig(java.lang.String prefix,
                                            java.lang.String paths)
                                     throws javax.servlet.ServletException

  Initialize the application configuration information for the specified module.

  Parameters:
    `prefix` - Module prefix for this module
    `paths` - Comma-separated list of context-relative resource path(s) for this modules's configuration resource(s)
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### parseModuleConfigFile

    private void parseModuleConfigFile(java.lang.String prefix,
                                       java.lang.String paths,
                                       ModuleConfig config,
                                       org.apache.commons.digester.Digester digester,
                                       java.lang.String path)
                                throws javax.servlet.UnavailableException

  Parses one module config file.

  Parameters:
    `prefix` -
    `paths` -
    `config` -
    `digester` - Digester instance that does the parsing
    `path` - The path to the config file to parse.
  Throws:
    `javax.servlet.UnavailableException`

### handleConfigException

    private void handleConfigException(java.lang.String paths,
                                       java.lang.Exception e)
                                throws javax.servlet.UnavailableException

  Simplifies exception handling in the parseModuleConfigFile() method.

  Parameters:
    `paths` -
    `e` -
  Throws:
    `javax.servlet.UnavailableException`

### initApplicationDataSources

    protected void initApplicationDataSources(ModuleConfig config)
                                       throws javax.servlet.ServletException

  Deprecated. use initModuleDataSources(ModuleConfig)

  Initialize the data sources for the specified module.

  Parameters:
    `config` - ModuleConfig information for this module
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### initModuleDataSources

    protected void initModuleDataSources(ModuleConfig config)
                                  throws javax.servlet.ServletException

  Initialize the data sources for the specified module.

  Parameters:
    `config` - ModuleConfig information for this module
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### initApplicationPlugIns

    protected void initApplicationPlugIns(ModuleConfig config)
                                   throws javax.servlet.ServletException

  Deprecated. use `initModulePlugIns(ModuleConfig)`

  Initialize the plug ins for the specified module.

  Parameters:
    `config` - ModuleConfig information for this module
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### initModulePlugIns

    protected void initModulePlugIns(ModuleConfig config)
                              throws javax.servlet.ServletException

  Initialize the plug ins for the specified module.

  Parameters:
    `config` - ModuleConfig information for this module
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### initApplicationMessageResources

    protected void initApplicationMessageResources(ModuleConfig config)
                                            throws javax.servlet.ServletException

  Deprecated. use initModuleMessageResources()

  Initialize the application MessageResources for the specified module.

  Parameters:
    `config` - ModuleConfig information for this module
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### initModuleMessageResources

    protected void initModuleMessageResources(ModuleConfig config)
                                       throws javax.servlet.ServletException

  Initialize the application MessageResources for the specified module.

  Parameters:
    `config` - ModuleConfig information for this module
  Throws:
    `javax.servlet.ServletException` - if initialization cannot be performed
  Since:
    Struts 1.1

### initConfigDigester

    protected org.apache.commons.digester.Digester initConfigDigester()
                                                               throws javax.servlet.ServletException

  Create (if needed) and return a new Digester instance that has been initialized to process Struts module configuraiton files and configure a corresponding ModuleConfig object (which must be pushed on to the evaluation stack before parsing begins).

  Throws:
    `javax.servlet.ServletException` - if a Digester cannot be configured
  Since:
    Struts 1.1

### initDataSources

    protected void initDataSources()
                            throws javax.servlet.ServletException

  Deprecated. Replaced by initApplicationDataSources() that takes an ModuleConfig argument. This method does nothing.

  Initialize data sources for the default module. This method signature is maintained only for backwards compatibility, and will be removed in a subsequent release.

    `javax.servlet.ServletException`

### initInternal

    protected void initInternal()
                         throws javax.servlet.ServletException

  Initialize our internal MessageResources bundle.

  Throws:
    `javax.servlet.ServletException` - if we cannot initialize these resources

### initOther

    protected void initOther()
                      throws javax.servlet.ServletException

  Initialize other global characteristics of the controller servlet.

  Throws:
    `javax.servlet.ServletException` - if we cannot initialize these resources

### initServlet

    protected void initServlet()
                        throws javax.servlet.ServletException

  Initialize the servlet mapping under which our controller servlet is being accessed. This will be used in the `&html:form>` tag to generate correct destination URLs for form submissions.

  Throws:
    `javax.servlet.ServletException` - if error happens while scanning web.xml

### process

    protected void process(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.io.IOException,
                           javax.servlet.ServletException

  Perform the standard request processing for this request, and create the corresponding response.

  Parameters:
    `request` - The servlet request we are processing
    `response` - The servlet response we are creating
  Throws:
    `java.io.IOException` - if an input/output error occurs
    `javax.servlet.ServletException` - if a servlet exception is thrown

### defaultControllerConfig

    private void defaultControllerConfig(ModuleConfig config)

  Deprecated. Will be removed in a release after Struts 1.1.

  Perform backwards-compatible configuration of the default module's controller configuration from servlet initialization parameters (as were used in Struts 1.0).

  Parameters:
    `config` - The ModuleConfig object for the default module
  Since:
    Struts 1.1

### defaultFormBeansConfig

    private void defaultFormBeansConfig(ModuleConfig config)

  Deprecated. Will be removed in a release after Struts 1.1.

  Perform backwards-compatible configuration of an ActionFormBeans collection, and expose it as a servlet context attribute (as was used in Struts 1.0). Note that the current controller code does not (and should not) reference this attribute for any reason.

  Parameters:
    `config` - The ModuleConfig object for the default app
  Since:
    Struts 1.1

### defaultForwardsConfig

    private void defaultForwardsConfig(ModuleConfig config)

  Deprecated. Will be removed in a release after Struts 1.1.

  Perform backwards-compatible configuration of an ActionForwards collection, and expose it as a servlet context attribute (as was used in Struts 1.0). Note that the current controller code does not (and should not) reference this attribute for any reason.

  Parameters:
    `config` - The ModuleConfig object for the default app
  Since:
    Struts 1.1

### defaultMappingsConfig

    private void defaultMappingsConfig(ModuleConfig config)

  Deprecated. Will be removed in a release after Struts 1.1.

  Perform backwards-compatible configuration of an ActionMappings collection, and expose it as a servlet context attribute (as was used in Struts 1.0). Note that the current controller code does not (and should not) reference this attribute for any reason.

  Parameters:
    `config` - The ModuleConfig object for the default app
  Since:
    Struts 1.1

### defaultMessageResourcesConfig

    private void defaultMessageResourcesConfig(ModuleConfig config)

  Deprecated. Will be removed in a release after Struts 1.1.

  Perform backwards-compatible configuration of the default module's message resources configuration from servlet initialization parameters (as were used in Struts 1.0).

  Parameters:
    `config` - The ModuleConfig object for the default module
  Since:
    Struts 1.1

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-2003 - Apache Software Foundation