org.apache.struts.plugins
public class ModuleConfigVerifier extends Object implements PlugIn
Convenient implementation of {@link PlugIn} that performs as many
verification tests on the information stored in the {@link ModuleConfig}
for this module as is practical. Based on the setting of the
fatal
property (which defaults to true
), the
detection of any such errors will cause a ServletException
to be thrown from the init
method, which will ultimately
cause the initialization of your Struts controller servlet to fail.
Under all circumstances, errors that are detected will be logged via
calls to ServletContext.log
.
Since: Struts 1.1
Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
Field Summary | |
---|---|
protected ModuleConfig | config The {@link ModuleConfig} instance for our module. |
boolean | fatal Should the existence of configuration errors be fatal. |
protected ActionServlet | servlet The {@link ActionServlet} instance we are associated with. |
Method Summary | |
---|---|
void | destroy() Receive notification that our owning module is being shut down. |
void | init(ActionServlet servlet, ModuleConfig config) |
boolean | isFatal() Return the "configuation errors are fatal" flag. |
protected void | log(String message) Log the specified message to our servlet context log, after a header including the module prefix. |
void | setFatal(boolean fatal) Set the "configuration errors are fatal" flag. |
protected boolean | verifyActionMappingClass() Return |
protected boolean | verifyForwardConfigs() Return |
protected boolean | verifyMessageResourcesConfigs() Return |
protected boolean | verifyPlugInConfigs() Return |
The {@link ModuleConfig} instance for our module.
Should the existence of configuration errors be fatal.
The {@link ActionServlet} instance we are associated with.
Receive notification that our owning module is being shut down.
Return the "configuation errors are fatal" flag.
Log the specified message to our servlet context log, after a header including the module prefix.
Parameters: message The message to be logged
Set the "configuration errors are fatal" flag.
Parameters: fatal The new flag value
Return true
if information returned by
config.getActionMappingClass
is all valid;
otherwise, log error messages and return false
.
Return true
if information returned by
config.findForwardConfigs
is all valid;
otherwise, log error messages and return false
.
Return true
if information returned by
config.findMessageResourcesConfigs
is all valid;
otherwise, log error messages and return false
.
Return true
if information returned by
config.findPluginConfigs
is all valid;
otherwise, log error messages and return false
.