This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/asf-site by this push: new e1364279d Automatic Site Publish by Buildbot e1364279d is described below commit e1364279d4f5372a1a6b882e95b66e2267332a3f Author: buildbot <us...@infra.apache.org> AuthorDate: Wed May 24 05:40:11 2023 +0000 Automatic Site Publish by Buildbot --- output/core-developers/configuration-files.html | 18 ++++----- .../configuration-provider-and-configuration.html | 8 +++- output/core-developers/constant-configuration.html | 3 +- output/core-developers/struts-xml.html | 2 +- output/plugins/plugins-architecture.html | 47 +++++++++++++--------- 5 files changed, 45 insertions(+), 33 deletions(-) diff --git a/output/core-developers/configuration-files.html b/output/core-developers/configuration-files.html index 99eab2d14..b797a8443 100644 --- a/output/core-developers/configuration-files.html +++ b/output/core-developers/configuration-files.html @@ -160,13 +160,7 @@ See <a href="reloading-configuration">Reloading configuration</a> for more.</p> <td><a href="struts-xml">struts.xml</a></td> <td>yes</td> <td>/WEB-INF/classes/</td> - <td>Main configuration, contains result/view types, action mappings, interceptors, and so forth \</td> - </tr> - <tr> - <td> </td> - <td> </td> - <td> </td> - <td> </td> + <td>Main configuration, contains result/view types, action mappings, interceptors, and so forth</td> </tr> <tr> <td><a href="default-properties">default.properties</a></td> @@ -187,10 +181,16 @@ See <a href="reloading-configuration">Reloading configuration</a> for more.</p> <td>Default macros referenced by velocity.properties</td> </tr> <tr> - <td>struts-plugin.xml</td> + <td><a href="../plugins/plugins-architecture">struts-plugin.xml</a></td> + <td>yes</td> + <td>At the root of a plugin JAR</td> + <td>Optional configuration files for Plugins in the same format as struts.xml.</td> + </tr> + <tr> + <td><a href="../plugins/plugins-architecture">struts-deferred.xml</a></td> <td>yes</td> <td>At the root of a plugin JAR</td> - <td>Optional configuration files for <a href="../plugins-developer-guide/">Plugins</a> in the same format as struts.xml.</td> + <td>Optional configuration files for Plugins, most useful for defining extension points</td> </tr> <tr> <td><a href="velocity-properties">velocity.properties</a></td> diff --git a/output/core-developers/configuration-provider-and-configuration.html b/output/core-developers/configuration-provider-and-configuration.html index be6d98308..25a844648 100644 --- a/output/core-developers/configuration-provider-and-configuration.html +++ b/output/core-developers/configuration-provider-and-configuration.html @@ -155,8 +155,12 @@ through a Dispatcher’s <a href="dispatcher-listener">DispatcherListener</a>.</ There is few different implementations that are already used internally by the Apache Struts:</p> <ul> - <li><code class="language-plaintext highlighter-rouge">XmlConfigurationProvider</code> - an abstract based implementation which can use XML files as source of configuration</li> - <li><code class="language-plaintext highlighter-rouge">StrutsXmlConfigurationProvider</code> - primary configuration provider, represents <code class="language-plaintext highlighter-rouge">struts.xml</code> and <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> files</li> + <li><code class="language-plaintext highlighter-rouge">XmlDocConfigurationProvider</code> - an abstract based implementation which can use XML documents from any source as +configuration</li> + <li><code class="language-plaintext highlighter-rouge">XmlConfigurationProvider</code> - an abstract based implementation which can use XML files on disk as source of +configuration</li> + <li><code class="language-plaintext highlighter-rouge">StrutsXmlConfigurationProvider</code> - primary configuration provider, represents <code class="language-plaintext highlighter-rouge">struts.xml</code>, <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> +and <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code> files</li> <li><code class="language-plaintext highlighter-rouge">PropertiesConfigurationProvider</code> - used to load <code class="language-plaintext highlighter-rouge">struts.properties</code> -<code class="language-plaintext highlighter-rouge">ServletContextAwareConfigurationProvider</code> - marking interface allowing to inject <code class="language-plaintext highlighter-rouge">ServletContext</code> into provider</li> </ul> diff --git a/output/core-developers/constant-configuration.html b/output/core-developers/constant-configuration.html index 03f9e30df..cf36457ff 100644 --- a/output/core-developers/constant-configuration.html +++ b/output/core-developers/constant-configuration.html @@ -141,10 +141,11 @@ for subsequent files to override previous ones:</p> <ol> <li><a href="struts-default-xml">struts-default.xml</a></li> - <li>struts-plugin.xml</li> + <li><a href="../plugins/plugins-architecture">struts-plugin.xml</a></li> <li><a href="struts-xml">struts.xml</a></li> <li><a href="default-properties">default.properties</a></li> <li><a href="web-xml">web.xml</a></li> + <li><a href="../plugins/plugins-architecture">struts-deferred.xml</a></li> </ol> <blockquote> diff --git a/output/core-developers/struts-xml.html b/output/core-developers/struts-xml.html index 85e87c9fb..55b905135 100644 --- a/output/core-developers/struts-xml.html +++ b/output/core-developers/struts-xml.html @@ -136,7 +136,7 @@ of the webapp (generally <code class="language-plaintext highlighter-rouge">/WEB <ul> <li>The default file may include other configuration files as needed.</li> - <li>A <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> file can be placed in a JAR and automatically plugged into an application, so that modules + <li>A <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> (and/or a <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code>) file can be placed in a JAR and automatically plugged into an application, so that modules can be self-contained and automatically configured.</li> <li>In the case of Freemarker and Velocity modules, the templates can also be loaded from the classpath, so the entire module can be plugged in as a single JAR.</li> diff --git a/output/plugins/plugins-architecture.html b/output/plugins/plugins-architecture.html index f0e15ba96..bad09d682 100644 --- a/output/plugins/plugins-architecture.html +++ b/output/plugins/plugins-architecture.html @@ -143,43 +143,49 @@ </li> <li><a href="#developing-new-extension-point" id="markdown-toc-developing-new-extension-point">Developing new extension point</a> <ul> <li><a href="#extension-point-provided-by-the-core" id="markdown-toc-extension-point-provided-by-the-core">Extension point provided by the Core</a></li> - <li><a href="#extension-point-provided-by-a-plugin" id="markdown-toc-extension-point-provided-by-a-plugin">Extension point provided by a plugin</a></li> + <li><a href="#plugin-ext" id="markdown-toc-plugin-ext">Plugin-defined extension points</a></li> </ul> </li> <li><a href="#plugin-registry" id="markdown-toc-plugin-registry">Plugin Registry</a></li> </ul> -<p>Struts 2 plugins contain classes and configuration that extend, replace, or add to existing Struts framework functionality. -A plugin can be installed by adding its JAR file to the application’s class path, in addition to the JAR files to fulfill -whatever dependencies the plugin itself may have. To configure the plugin, the JAR should contain a <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> -file, which follows the same format as an ordinary <code class="language-plaintext highlighter-rouge">struts.xml</code> file.</p> +<p>Struts 2 plugins contain classes and configuration that extend, replace, or add to existing Struts framework +functionality. A plugin can be installed by adding its JAR file to the application’s class path, in addition to the JAR +files to fulfill whatever dependencies the plugin itself may have. To configure the plugin, the JAR should contain +a <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> file and optionally a <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code>, which follow the same format as an +ordinary <code class="language-plaintext highlighter-rouge">struts.xml</code> file.</p> -<p>Since a plugin can contain the <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> file, it has the ability to:</p> +<p>Since a plugin can contain these xml files, they have the ability to:</p> <ul> <li>Define new packages with results, interceptors, and/or actions</li> <li>Override framework constants</li> <li>Introduce new extension point implementation classes</li> </ul> -<p>Many popular but optional features of the framework are distributed as plugins. An application can retain all the plugins -provided with the distribution, or just include the ones it uses. Plugins can be used to organize application code -or to distribute code to third-parties.</p> +<p>Whilst configuration from <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> is loaded prior to <code class="language-plaintext highlighter-rouge">struts.xml</code>, <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code> is loaded after all +other configuration is loaded. This makes it useful for defining <a href="#plugin-ext">plugin extension points</a>.</p> -<p>Packages defined in a plugin can have parent packages that are defined in another plugin. Plugins may define -configuration elements with classes not contained in the plugin. Any classes not included in the plugin’s JAR must be -on the application’s classpath at runtime. As from Struts 2.3.5</p> +<p>Many popular but optional features of the framework are distributed as plugins. An application can retain all the +plugins provided with the distribution, or just include the ones it uses. Plugins can be used to organize application +code or to distribute code to third-parties.</p> -<p>The framework loads its default configuration first, then any plugin configuration files found in others JARs -on the classpath, and finally the “bootstrap” <code class="language-plaintext highlighter-rouge">struts.xml</code>.</p> +<p>Packages defined in a plugin can have parent packages that are defined in another plugin. Plugins may define +configuration elements with classes not contained in the plugin. Any classes not included in the plugin’s JAR must be on +the application’s classpath at runtime. As from Struts 2.3.5</p> + +<p>The framework loads its default configuration first, then any <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> files found in others JARs on the +classpath, the “bootstrap” <code class="language-plaintext highlighter-rouge">struts.xml</code>, then finally any <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code> files.</p> <ol> <li><code class="language-plaintext highlighter-rouge">struts-default.xml</code> (bundled in the Core JAR)</li> <li><code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> (as many as can be found in other JARs)</li> <li><code class="language-plaintext highlighter-rouge">struts.xml</code> (provided by your application)</li> + <li><code class="language-plaintext highlighter-rouge">struts-deferred.xml</code> (as many as can be found in other JARs)</li> </ol> -<p>Since the <code class="language-plaintext highlighter-rouge">struts.xml</code> file is always loaded last, it can make use of any resources provided by the plugins bundled -with the distribution, or any other plugins available to an application.</p> +<p>Since the <code class="language-plaintext highlighter-rouge">struts.xml</code> file is loaded between <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code> and before any potential plugin extension points +in <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code>, it can make use of any resources provided by the plugins bundled with the distribution, or any +other plugins available to an application.</p> <h2 id="static-resources">Static resources</h2> @@ -639,10 +645,11 @@ in <code class="language-plaintext highlighter-rouge">struts.xml</code> with a n <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>struts.date.formatter=myDateTimeFormatter </code></pre></div></div> -<h3 id="extension-point-provided-by-a-plugin">Extension point provided by a plugin</h3> +<h3 id="plugin-ext">Plugin-defined extension points</h3> -<p>It’s very the like as above except that the plugin must provide a <code class="language-plaintext highlighter-rouge">bean-selection</code> configuration option in <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code>. -The <code class="language-plaintext highlighter-rouge">bean-selection</code> option represents an implementation of a class <code class="language-plaintext highlighter-rouge">org.apache.struts2.config.AbstractBeanSelectionProvider</code> +<p>It’s very much like above except that the plugin must provide a <code class="language-plaintext highlighter-rouge">bean-selection</code> configuration option +in <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code>. The <code class="language-plaintext highlighter-rouge">bean-selection</code> option represents an implementation of a +class <code class="language-plaintext highlighter-rouge">org.apache.struts2.config.AbstractBeanSelectionProvider</code> with <em>no-arguments</em> constructor:</p> <div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">VelocityBeanSelectionProvider</span> <span class="kd">extends</span> <span class="nc">AbstractBeanSelectionProvider</span> <span class="o">{</span> @@ -657,7 +664,7 @@ with <em>no-arguments</em> constructor:</p> <p>The class defines extension points by implementing <code class="language-plaintext highlighter-rouge">register()</code> method and using <code class="language-plaintext highlighter-rouge">alias()</code> method to register them.</p> -<p>And finally it must be added to the <code class="language-plaintext highlighter-rouge">struts-plugin.xml</code>:</p> +<p>And finally it must be added to the <code class="language-plaintext highlighter-rouge">struts-deferred.xml</code>:</p> <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><?xml version="1.0" encoding="UTF-8" ?></span> <span class="cp"><!DOCTYPE struts PUBLIC