You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Apache Wiki <wi...@apache.org> on 2005/10/08 23:26:09 UTC

[Struts Wiki] Update of "StrutsPlugins" by NiallPemberton

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.

The following page has been changed by NiallPemberton:
http://wiki.apache.org/struts/StrutsPlugins

The comment on the change is:
Add a page on Struts PlugIns

New 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.

== 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.

 * {1} [http://struts.apache.org/userGuide/building_controller.html#plugin_classes User Guide: PlugIn Classes]
 * {2} [http://struts.apache.org/userGuide/configuration.html#plugin_config User Guide: PlugIn Config]
 * {3} [http://struts.apache.org/api/org/apache/struts/action/PlugIn.html PlugIn JavaDoc]

== 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 [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:

 * {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]).

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].

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org