Differences between revisions 3 and 4
Revision 3 as of 2006-02-08 22:29:20
Size: 1751
Comment: Add a link to the StrutsInitialization page
Revision 4 as of 2009-09-20 23:11:51
Size: 1769
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
{i} Questions on [http://www.mail-archive.com/user@struts.apache.org/msg32051.html How To Implement Application Startup/Shutdown Behaviour] have come up a number of times on the user list - hence this page. {i} Questions on [[http://www.mail-archive.com/user@struts.apache.org/msg32051.html|How To Implement Application Startup/Shutdown Behaviour]] have come up a number of times on the user list - hence this page.
Line 8: Line 8:
 * {1} [http://struts.apache.org/struts-doc-1.2.x/userGuide/building_controller.html#plugin_classes User Guide: PlugIn Classes]
 * {2} [http://struts.apache.org/struts-doc-1.2.x/userGuide/configuration.html#plugin_config User Guide: PlugIn Config]
 * {3} [http://struts.apache.org/struts-core/apidocs/org/apache/struts/action/PlugIn.html PlugIn JavaDoc]
 * {1} [[http://struts.apache.org/struts-doc-1.2.x/userGuide/building_controller.html#plugin_classes|User Guide: PlugIn Classes]]
 * {2} [[http://struts.apache.org/struts-doc-1.2.x/userGuide/configuration.html#plugin_config|User Guide: PlugIn Config]]
 * {3} [[http://struts.apache.org/struts-core/apidocs/org/apache/struts/action/PlugIn.html|PlugIn JavaDoc]]
Line 15: Line 15:
The Servlet 2.3 specification introduced the [http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContextListener.html ServletContextListener] which provides the same facilities. Rather than repeat other peoples words, below are some points from a recent thread: The Servlet 2.3 specification introduced the [[http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContextListener.html|ServletContextListener]] which provides the same facilities. Rather than repeat other peoples words, below are some points from a recent thread:
Line 17: Line 17:
 * {1} [http://www.mail-archive.com/user@struts.apache.org/msg32058.html ServletContextListener is portable]
 * {2} [http://www.mail-archive.com/user@struts.apache.org/msg32061.html Servlet Unloads] (and also [http://mail-archives.apache.org/mod_mbox/struts-user/200504.mbox/%3cf8b39ace0504081140546d6341@mail.gmail.com%3e here]).
 * {1} [[http://www.mail-archive.com/user@struts.apache.org/msg32058.html|ServletContextListener is portable]]
 * {2} [[http://www.mail-archive.com/user@struts.apache.org/msg32061.html|Servlet Unloads]] (and also [[http://mail-archives.apache.org/mod_mbox/struts-user/200504.mbox/%3cf8b39ace0504081140546d6341@mail.gmail.com%3e|here]]).
Line 20: Line 20:
If you want to know how to use a !ServletContextListener then [http://www.mail-archive.com/user@struts.apache.org/msg32052.html See this post]. If you want to know how to use a !ServletContextListener then [[http://www.mail-archive.com/user@struts.apache.org/msg32052.html|See this post]].

{i} Questions on How To Implement Application Startup/Shutdown Behaviour have come up a number of times on the user list - hence this page.

N.B. See also the StrutsInitialization page.

Struts PlugIn

The Struts PlugIn provides implementation points for the application startup and shutdown phases. Struts was developed in a Servlet 2.2 environment which provided no such equivalent mechanism.

PlugIn or ServletContextListener?

In a Servlet 2.2 environment then the only choice is a PlugIn (or using a Startup Servlet).

The Servlet 2.3 specification introduced the ServletContextListener which provides the same facilities. Rather than repeat other peoples words, below are some points from a recent thread:

If you want to know how to use a ServletContextListener then See this post.

StrutsPlugins (last edited 2009-09-20 23:11:51 by localhost)