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 aaff759 Updates production by Jenkins aaff759 is described below commit aaff75925b88b019baf578c3040155589336c983 Author: jenkins <bui...@apache.org> AuthorDate: Thu Nov 23 16:37:05 2017 +0000 Updates production by Jenkins --- content/core-developers/basic-validation.html | 12 +-- .../core-developers/client-side-validation.html | 29 +------ content/core-developers/client-validation.html | 21 +---- .../configuration-provider-and-configuration.html | 7 +- content/core-developers/file-upload.html | 70 +++------------- content/core-developers/freemarker-support.html | 21 +---- content/core-developers/jboss-5.html | 7 +- content/core-developers/model-driven.html | 24 +----- content/core-developers/namespace-annotation.html | 12 +-- content/core-developers/object-factory.html | 14 +--- .../core-developers/parent-package-annotation.html | 7 +- .../pure-java-script-client-side-validation.html | 7 +- content/core-developers/restful-action-mapper.html | 7 +- content/core-developers/result-annotation.html | 77 ++--------------- content/core-developers/weblogic-6-1.html | 35 ++------ content/core-developers/weblogic.html | 48 +++-------- content/core-developers/zero-configuration.html | 21 +---- content/tag-developers/form-tags.html | 96 ++-------------------- content/tag-developers/tag-syntax.html | 59 ++----------- content/tag-developers/velocity.html | 7 +- 20 files changed, 78 insertions(+), 503 deletions(-) diff --git a/content/core-developers/basic-validation.html b/content/core-developers/basic-validation.html index 8a90e65..8606999 100644 --- a/content/core-developers/basic-validation.html +++ b/content/core-developers/basic-validation.html @@ -215,17 +215,7 @@ <h2 id="step-3">Step 3</h2> -<p>Create the validators. The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>validation.xml -</code></pre> -</div> -<p>format is either</p> - -<div class="highlighter-rouge"><pre class="highlight"><code><ActionClassName>-validation.xml -</code></pre> -</div> -<p>or</p> +<p>Create the validators. The <code class="highlighter-rouge">validation.xml</code> format is either <code class="highlighter-rouge"><ActionClassName>-validation.xml</code> or</p> <div class="highlighter-rouge"><pre class="highlight"><code><ActionClassName>-<ActionAliasName>-validation.xml </code></pre> diff --git a/content/core-developers/client-side-validation.html b/content/core-developers/client-side-validation.html index 11e5cd7..eb567b6 100644 --- a/content/core-developers/client-side-validation.html +++ b/content/core-developers/client-side-validation.html @@ -130,12 +130,7 @@ <p>The framework adds support for client-side validation on top of the standard validation framework.</p> -<p>Client-side validation can be enabled on a per-form basis by specifying</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>validate="true" -</code></pre> -</div> -<p>in the <em>form</em> tag.</p> +<p>Client-side validation can be enabled on a per-form basis by specifying <code class="highlighter-rouge">validate="true"</code> in the <em>form</em> tag.</p> <div class="highlighter-rouge"><pre class="highlight"><code><s:form name="test" action="javascriptValidation" validate="true"> ... @@ -144,27 +139,7 @@ </code></pre> </div> -<p>If a</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>name -</code></pre> -</div> -<p>for the form is not given, the action mapping name will be used as the form name. Otherwise, a correct</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>action -</code></pre> -</div> -<p>and</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>namespace -</code></pre> -</div> -<p>attributes must be provided to the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code><saf:form> -</code></pre> -</div> -<p>tag.</p> +<p>If a <code class="highlighter-rouge">name</code> for the form is not given, the action mapping name will be used as the form name. Otherwise, a correct <code class="highlighter-rouge">action</code> and <code class="highlighter-rouge">namespace</code> attributes must be provided to the <code class="highlighter-rouge"><saf:form></code> tag.</p> <p><strong>Referencing “submitProfile” in the “/user” namespace</strong></p> diff --git a/content/core-developers/client-validation.html b/content/core-developers/client-validation.html index aa26066..bf4a2b6 100644 --- a/content/core-developers/client-validation.html +++ b/content/core-developers/client-validation.html @@ -130,12 +130,7 @@ <p>Let’s create a Client-Side validation workflow, step by step.</p> -<p>(information) The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>validate -</code></pre> -</div> -<p>attribute is set to</p> +<p>(information) The <code class="highlighter-rouge">validate</code> attribute is set to</p> <div class="highlighter-rouge"><pre class="highlight"><code>true </code></pre> @@ -182,12 +177,7 @@ </code></pre> </div> -<p>(information) This case uses the default xhtml theme, so the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code><s:head > -</code></pre> -</div> -<p>tag is used to link a style sheet.</p> +<p>(information) This case uses the default xhtml theme, so the <code class="highlighter-rouge"><s:head ></code> tag is used to link a style sheet.</p> <h2 id="step-2">Step 2</h2> @@ -233,12 +223,7 @@ <p><strong>Step 3</strong></p> -<p>Create the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>validation.xml -</code></pre> -</div> -<p>to configure the validators to be used.</p> +<p>Create the <code class="highlighter-rouge">validation.xml</code> to configure the validators to be used.</p> <div class="highlighter-rouge"><pre class="highlight"><code><span class="c"><!-- Add the following DOCTYPE declaration as first line of your XXX-validation.xml file: diff --git a/content/core-developers/configuration-provider-and-configuration.html b/content/core-developers/configuration-provider-and-configuration.html index 034d976..66507dc 100644 --- a/content/core-developers/configuration-provider-and-configuration.html +++ b/content/core-developers/configuration-provider-and-configuration.html @@ -170,12 +170,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>XmlConfigurationProvider </code></pre> </div> -<p>- proprietary XWork implementation which are using</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>xwork.xml -</code></pre> -</div> -<p>file as source of configuration </p> +<p>- proprietary XWork implementation which are using <code class="highlighter-rouge">xwork.xml</code> file as source of configuration </p> <ul> <li></li> diff --git a/content/core-developers/file-upload.html b/content/core-developers/file-upload.html index a5eb250..1f1a215 100644 --- a/content/core-developers/file-upload.html +++ b/content/core-developers/file-upload.html @@ -198,12 +198,7 @@ <h2 id="basic-usage">Basic Usage</h2> -<p>The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>org.apache.struts2.interceptor.FileUploadInterceptor -</code></pre> -</div> -<p>class is included as part of the</p> +<p>The <code class="highlighter-rouge">org.apache.struts2.interceptor.FileUploadInterceptor</code> class is included as part of the</p> <div class="highlighter-rouge"><pre class="highlight"><code>defaultStack </code></pre> @@ -303,12 +298,7 @@ <h2 id="uploading-multiple-files">Uploading Multiple Files</h2> -<p>As mentioned in the previous section one technique for uploading multiple files would be to simply have multiple form input elements of type file all with different names. This would require a number of setter methods that was equal to 3 times the number of files being uploaded. Another option is to use Arrays or java.util.Lists. The following examples are taken from the Showcase example application that is part sample applications you can download at <a href="http://struts\.apache\.o [...] - -<div class="highlighter-rouge"><pre class="highlight"><code>struts-fileupload.xml -</code></pre> -</div> -<p>in the sample application download.</p> +<p>As mentioned in the previous section one technique for uploading multiple files would be to simply have multiple form input elements of type file all with different names. This would require a number of setter methods that was equal to 3 times the number of files being uploaded. Another option is to use Arrays or java.util.Lists. The following examples are taken from the Showcase example application that is part sample applications you can download at <a href="http://struts\.apache\.o [...] <p><strong>Uploading Multiple Files using Arrays</strong></p> @@ -466,12 +456,7 @@ struts.multipart.maxSize=2097152 </tbody> </table> -<p>In order to change theses settings you define a constant in your applications</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.xml -</code></pre> -</div> -<p>file like so:</p> +<p>In order to change theses settings you define a constant in your applications <code class="highlighter-rouge">struts.xml</code> file like so:</p> <div class="highlighter-rouge"><pre class="highlight"><code><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> <span class="cp"><!DOCTYPE struts PUBLIC @@ -485,12 +470,7 @@ struts.multipart.maxSize=2097152 </code></pre> </div> -<p>Additionally the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>fileUpload -</code></pre> -</div> -<p>interceptor has settings that can be put in place for individual action mappings by customizing your interceptor stack.</p> +<p>Additionally the <code class="highlighter-rouge">fileUpload</code> interceptor has settings that can be put in place for individual action mappings by customizing your interceptor stack.</p> <div class="highlighter-rouge"><pre class="highlight"><code><action name="doUpload" class="com.example.UploadAction"> <interceptor-ref name="basicStack"/> @@ -508,22 +488,12 @@ struts.multipart.maxSize=2097152 <p><strong>File Size Limits</strong></p> -<p>There are two separate file size limits. First is</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.multipart.maxSize -</code></pre> -</div> -<p>which comes from the Struts 2</p> +<p>There are two separate file size limits. First is <code class="highlighter-rouge">struts.multipart.maxSize</code> which comes from the Struts 2</p> <div class="highlighter-rouge"><pre class="highlight"><code>default.properties </code></pre> </div> -<p>file. This setting exists for security reasons to prohibit a malicious user from uploading extremely large files to file up your servers disk space. This setting defaults to approximately 2 megabytes and should be adjusted to the maximum size file (2 gigs max) that your will need the framework to receive. If you are uploading more than one file on a form the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.multipart.maxSize -</code></pre> -</div> -<p>applies to the combined total, not the individual file sizes. The other setting,</p> +<p>file. This setting exists for security reasons to prohibit a malicious user from uploading extremely large files to file up your servers disk space. This setting defaults to approximately 2 megabytes and should be adjusted to the maximum size file (2 gigs max) that your will need the framework to receive. If you are uploading more than one file on a form the <code class="highlighter-rouge">struts.multipart.maxSize</code> applies to the combined total, not the individual file sizes. Th [...] <div class="highlighter-rouge"><pre class="highlight"><code>maximumSize </code></pre> @@ -570,21 +540,11 @@ struts.multipart.maxSize=2097152 </code></pre> </div> -<p>When the uploaded file type does not match one of the MIME types specified a field error will be created as described in the next section entitled Error Messages. Programmatically limiting the file type means using the information passed in to your Action class via the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>setXContentType(String contentType) -</code></pre> -</div> -<p>method. The benefit to this type of approach would be that it’s more flexible and no interceptor configuration would be needed if file sizes are keep under 2 megs.</p> +<p>When the uploaded file type does not match one of the MIME types specified a field error will be created as described in the next section entitled Error Messages. Programmatically limiting the file type means using the information passed in to your Action class via the <code class="highlighter-rouge">setXContentType(String contentType)</code> method. The benefit to this type of approach would be that it’s more flexible and no interceptor configuration would be needed if file sizes are [...] <p><strong>Error Messages</strong></p> -<p>If an error occurs several field errors will be added assuming that the action implements</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>com.opensymphony.xwork2.ValidationAware -</code></pre> -</div> -<p>or extends</p> +<p>If an error occurs several field errors will be added assuming that the action implements <code class="highlighter-rouge">com.opensymphony.xwork2.ValidationAware</code> or extends</p> <div class="highlighter-rouge"><pre class="highlight"><code>com.opensymphony.xwork2.ActionSupport </code></pre> @@ -628,12 +588,7 @@ struts.multipart.maxSize=2097152 <p><strong>Temporary Directories</strong></p> -<p>All uploaded files are saved to a temporary directory by the framework before being passed in to an Action. Depending on the allowed file sizes it may be necessary to have the framework store these temporary files in an alternate location. To do this change</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.multipart.saveDir -</code></pre> -</div> -<p>to the directory where the uploaded files will be placed. If this property is not set it defaults to</p> +<p>All uploaded files are saved to a temporary directory by the framework before being passed in to an Action. Depending on the allowed file sizes it may be necessary to have the framework store these temporary files in an alternate location. To do this change <code class="highlighter-rouge">struts.multipart.saveDir</code> to the directory where the uploaded files will be placed. If this property is not set it defaults to</p> <div class="highlighter-rouge"><pre class="highlight"><code>javax.servlet.context.tempdir </code></pre> @@ -647,12 +602,7 @@ struts.multipart.maxSize=2097152 <p><strong>Alternate Libraries</strong></p> -<p>The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.multipart.parser -</code></pre> -</div> -<p>used by the fileUpload interceptor to handle HTTP POST requests, encoded using the MIME-type multipart/form-data, can be changed out. Currently there are two choices, jakarta and pell. The jakarta parser is a standard part of the Struts 2 framework needing only its required libraries added to a project. The pell parser uses Jason Pell’s multipart parser instead of the Commons-FileUpload library. The pell parser is a Struts 2 plugin, for more details see: <em>pell multipart plugin</em> [...] +<p>The <code class="highlighter-rouge">struts.multipart.parser</code> used by the fileUpload interceptor to handle HTTP POST requests, encoded using the MIME-type multipart/form-data, can be changed out. Currently there are two choices, jakarta and pell. The jakarta parser is a standard part of the Struts 2 framework needing only its required libraries added to a project. The pell parser uses Jason Pell’s multipart parser instead of the Commons-FileUpload library. The pell parser is a St [...] <p>As from Struts version 2.3.18 a new implementation of </p> diff --git a/content/core-developers/freemarker-support.html b/content/core-developers/freemarker-support.html index 2033adc..a460d81 100644 --- a/content/core-developers/freemarker-support.html +++ b/content/core-developers/freemarker-support.html @@ -137,12 +137,7 @@ <p><strong>Configure your action to use the freemarker result type</strong></p> -<p>The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>freemarker -</code></pre> -</div> -<p>result type is defined in</p> +<p>The <code class="highlighter-rouge">freemarker</code> result type is defined in</p> <div class="highlighter-rouge"><pre class="highlight"><code>struts-default.xml </code></pre> @@ -178,12 +173,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>stack.findValue("name") </code></pre> </div> -<p>, which <em>generaly</em> results in</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>action.getName() -</code></pre> -</div> -<p>being executed.</p> +<p>, which <em>generaly</em> results in <code class="highlighter-rouge">action.getName()</code> being executed.</p> <p>A search process is used to resolve the variable, searching the following scopes in order, until a value is found :</p> @@ -277,12 +267,7 @@ <p><strong>FreeMarker configuration with recent releases</strong></p> -<p>To configure the freemarker engine that Struts uses, just add a file</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>freemarker.properties -</code></pre> -</div> -<p>to the classpath. The supported properties are those that the Freemarker Configuration object expects - see the <a href="http://freemarker\.org/docs/api/freemarker/template/Configuration\.html\#setSetting(java\.lang\.String,%20java\.lang\.String)">Freemarker documentation</a>^[http://freemarker.org/docs/api/freemarker/template/Configuration.html#setSetting(java.lang.String,%20java.lang.String)] for these.</p> +<p>To configure the freemarker engine that Struts uses, just add a file <code class="highlighter-rouge">freemarker.properties</code> to the classpath. The supported properties are those that the Freemarker Configuration object expects - see the <a href="http://freemarker\.org/docs/api/freemarker/template/Configuration\.html\#setSetting(java\.lang\.String,%20java\.lang\.String)">Freemarker documentation</a>^[http://freemarker.org/docs/api/freemarker/template/Configuration.html#setSetting( [...] <div class="highlighter-rouge"><pre class="highlight"><code>default_encoding=ISO-8859-1 template_update_delay=5 diff --git a/content/core-developers/jboss-5.html b/content/core-developers/jboss-5.html index 31d58f6..f465567 100644 --- a/content/core-developers/jboss-5.html +++ b/content/core-developers/jboss-5.html @@ -135,12 +135,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>WEB-INF/classes </code></pre> </div> -<p>, you must add the following line into</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$JBOSS_HOME/bin/run.conf -</code></pre> -</div> -<p>or into</p> +<p>, you must add the following line into <code class="highlighter-rouge">$JBOSS_HOME/bin/run.conf</code> or into</p> <div class="highlighter-rouge"><pre class="highlight"><code>$JBOSS_HOME\bin\run.conf.bat </code></pre> diff --git a/content/core-developers/model-driven.html b/content/core-developers/model-driven.html index 5ed836e..f1e485f 100644 --- a/content/core-developers/model-driven.html +++ b/content/core-developers/model-driven.html @@ -130,31 +130,11 @@ <p>Struts 2 does not have “forms” like Struts 1 did. In Struts 2 request parameters are bound directly to fields in the actions class, and this class is placed on top of the stack when the action is executed.</p> -<p>If an action class implements the interface</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>com.opensymphony.xwork2.ModelDriven -</code></pre> -</div> -<p>then it needs to return an object from the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>getModel() -</code></pre> -</div> -<p>method. Struts will then populate the fields of this object with the request parameters, and this object will be placed on top of the stack once the action is executed. Validation will also be performed on this model object, instead of the action. Please read about <a href="visitor-field-validator-annotation.html">VisitorFieldValidator Annotation</a> which can help you validate model’s fields.</p> +<p>If an action class implements the interface <code class="highlighter-rouge">com.opensymphony.xwork2.ModelDriven</code> then it needs to return an object from the <code class="highlighter-rouge">getModel()</code> method. Struts will then populate the fields of this object with the request parameters, and this object will be placed on top of the stack once the action is executed. Validation will also be performed on this model object, instead of the action. Please read about <a href="vi [...] <h2 id="interceptor">Interceptor</h2> -<p>To use</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>ModelDriven -</code></pre> -</div> -<p>actions, make sure that the <a href="model-driven-interceptor.html">Model Driven Interceptor</a> is applied to your action. This interceptor is part of the default interceptor stack</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>defaultStack -</code></pre> -</div> -<p>so it is applied to all actions by default.</p> +<p>To use <code class="highlighter-rouge">ModelDriven</code> actions, make sure that the <a href="model-driven-interceptor.html">Model Driven Interceptor</a> is applied to your action. This interceptor is part of the default interceptor stack <code class="highlighter-rouge">defaultStack</code> so it is applied to all actions by default.</p> <h2 id="example">Example</h2> diff --git a/content/core-developers/namespace-annotation.html b/content/core-developers/namespace-annotation.html index d8c3999..85726be 100644 --- a/content/core-developers/namespace-annotation.html +++ b/content/core-developers/namespace-annotation.html @@ -130,17 +130,7 @@ <h2 id="namespace-annotation-1">Namespace Annotation</h2> -<p>The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>@Namespace -</code></pre> -</div> -<p>annotation allows the definition of an Action’s namespace in the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>Action -</code></pre> -</div> -<p>class rather than based on <a href="zero-configuration.html">Zero Configuration</a>’s conventions.</p> +<p>The <code class="highlighter-rouge">@Namespace</code> annotation allows the definition of an Action’s namespace in the <code class="highlighter-rouge">Action</code> class rather than based on <a href="zero-configuration.html">Zero Configuration</a>’s conventions.</p> <h3 id="usage">Usage</h3> diff --git a/content/core-developers/object-factory.html b/content/core-developers/object-factory.html index 94c1087..42846b9 100644 --- a/content/core-developers/object-factory.html +++ b/content/core-developers/object-factory.html @@ -165,12 +165,7 @@ <h3 id="define-dedicated-factory">Define dedicated factory</h3> -<p>If you want to just extend one part of ObjectFactory, ie. to change how <a href="result-types.html">Result Types</a> are build, you can implement</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>ResultFactory -</code></pre> -</div> -<p>interface and register it with dedicated name, see <em>Extension Points</em> for more details. Original ObjectFactory will use these dedicated factories to do the work. It’s already done this way - the original functionality of ObjectFactory was extracted to separated classes which implements the interfaces below. Check the source of ObjectFactory to see more details. All these factories are available as from version 2.3.16.</p> +<p>If you want to just extend one part of ObjectFactory, ie. to change how <a href="result-types.html">Result Types</a> are build, you can implement <code class="highlighter-rouge">ResultFactory</code> interface and register it with dedicated name, see <em>Extension Points</em> for more details. Original ObjectFactory will use these dedicated factories to do the work. It’s already done this way - the original functionality of ObjectFactory was extracted to separated classes which implem [...] <p>List of Factory interfaces:</p> @@ -190,12 +185,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>StrutsResultFactory </code></pre> </div> -<p>it’s internal implementation which checks if Result implements</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>ParamNameAwareResult -</code></pre> -</div> -<p>interface to restrict names of parameters set on the instance of Result, see <a href="result-types.html">Result Types</a> for more info.</p> +<p>it’s internal implementation which checks if Result implements <code class="highlighter-rouge">ParamNameAwareResult</code> interface to restrict names of parameters set on the instance of Result, see <a href="result-types.html">Result Types</a> for more info.</p> <ul> <li></li> diff --git a/content/core-developers/parent-package-annotation.html b/content/core-developers/parent-package-annotation.html index f100fce..1062fc6 100644 --- a/content/core-developers/parent-package-annotation.html +++ b/content/core-developers/parent-package-annotation.html @@ -128,12 +128,7 @@ <a class="edit-on-gh" href="https://github.com/apache/struts-site/edit/master/source/core-developers/parent-package-annotation.md" title="Edit this page on GitHub">Edit on GitHub</a> <h1 id="parentpackage-annotation">ParentPackage Annotation</h1> -<p>The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>@ParentPackage -</code></pre> -</div> -<p>annotation allows the definition of</p> +<p>The <code class="highlighter-rouge">@ParentPackage</code> annotation allows the definition of</p> <div class="highlighter-rouge"><pre class="highlight"><code>Action </code></pre> diff --git a/content/core-developers/pure-java-script-client-side-validation.html b/content/core-developers/pure-java-script-client-side-validation.html index bcce272..133d52f 100644 --- a/content/core-developers/pure-java-script-client-side-validation.html +++ b/content/core-developers/pure-java-script-client-side-validation.html @@ -162,12 +162,7 @@ some values will be considered acceptable by the JavaScript code but will be mar <p><strong>Error reporting</strong></p> -<p>Because client side validation does not talk to the server, the theme (<em>xhtml theme</em> or <em>css_xhtml theme</em> ) is responsible for properly manipulating the HTML DOM to display the error message inline. The JavaScript that is responsible for doing this logic is</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>validation.js -</code></pre> -</div> -<p>and can be found in each theme.</p> +<p>Because client side validation does not talk to the server, the theme (<em>xhtml theme</em> or <em>css_xhtml theme</em> ) is responsible for properly manipulating the HTML DOM to display the error message inline. The JavaScript that is responsible for doing this logic is <code class="highlighter-rouge">validation.js</code> and can be found in each theme.</p> <table> <tbody> diff --git a/content/core-developers/restful-action-mapper.html b/content/core-developers/restful-action-mapper.html index 0d0f706..7f663e5 100644 --- a/content/core-developers/restful-action-mapper.html +++ b/content/core-developers/restful-action-mapper.html @@ -280,12 +280,7 @@ <p><strong>Unit testing</strong></p> -<p>Below you will find a simple unit test to test how to test actions when</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>Restful2ActionMapper -</code></pre> -</div> -<p>is used.</p> +<p>Below you will find a simple unit test to test how to test actions when <code class="highlighter-rouge">Restful2ActionMapper</code> is used.</p> <div class="highlighter-rouge"><pre class="highlight"><code> public class MovieActionTest extends StrutsJUnit4TestCase<MovieActionTest>{ diff --git a/content/core-developers/result-annotation.html b/content/core-developers/result-annotation.html index e45c70b..2a13520 100644 --- a/content/core-developers/result-annotation.html +++ b/content/core-developers/result-annotation.html @@ -128,22 +128,7 @@ <a class="edit-on-gh" href="https://github.com/apache/struts-site/edit/master/source/core-developers/result-annotation.md" title="Edit this page on GitHub">Edit on GitHub</a> <h1 id="result-annotation">Result Annotation</h1> -<p>The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>@Result -</code></pre> -</div> -<p>annotation allows the definition of</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>Action -</code></pre> -</div> -<p>results in the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>Action -</code></pre> -</div> -<p>class rather than an XML file.</p> +<p>The <code class="highlighter-rouge">@Result</code> annotation allows the definition of <code class="highlighter-rouge">Action</code> results in the <code class="highlighter-rouge">Action</code> class rather than an XML file.</p> <table> <tbody> @@ -160,42 +145,7 @@ </tbody> </table> -<p>In order for</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>@Result -</code></pre> -</div> -<p>and</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>@Results -</code></pre> -</div> -<p>annotations to be configured correctly you must set the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>actionPackages -</code></pre> -</div> -<p>filter</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>init-param -</code></pre> -</div> -<p>to a comma-separated list of packages containing the annotated</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>Action -</code></pre> -</div> -<p>classes. See <a href="zero-configuration.html">Zero Configuration</a> for further information; there are</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>Action -</code></pre> -</div> -<p>class naming conventions if you don’t implement the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>Action -</code></pre> -</div> -<p>interface and other tidbits there.</p> +<p>In order for <code class="highlighter-rouge">@Result</code> and <code class="highlighter-rouge">@Results</code> annotations to be configured correctly you must set the <code class="highlighter-rouge">actionPackages</code> filter <code class="highlighter-rouge">init-param</code> to a comma-separated list of packages containing the annotated <code class="highlighter-rouge">Action</code> classes. See <a href="zero-configuration.html">Zero Configuration</a> for further information; there [...] <h2 id="result-annotation-parameters">@Result Annotation Parameters</h2> @@ -284,12 +234,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>ServletActionRedirectResult.class </code></pre> </div> -<p>- equivalent to the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>redirectAction -</code></pre> -</div> -<p>type in XML config</p> +<p>- equivalent to the <code class="highlighter-rouge">redirectAction</code> type in XML config</p> <ul> <li></li> @@ -300,16 +245,12 @@ </div> <ul> - <li>.. (for more result, please consult the API docs, and look for implementations of the XWork</li> -</ul> - -<div class="highlighter-rouge"><pre class="highlight"><code>Result -</code></pre> -</div> -<p>interface)</p> - -<ul> - <li>params - An Array of the parameters in the form {key1, value1, key2, value2}</li> + <li> + <p>.. (for more result, please consult the API docs, and look for implementations of the XWork <code class="highlighter-rouge">Result</code> interface)</p> + </li> + <li> + <p>params - An Array of the parameters in the form {key1, value1, key2, value2}</p> + </li> </ul> <h2 id="result--defining-a-single-result">@Result – Defining a Single Result</h2> diff --git a/content/core-developers/weblogic-6-1.html b/content/core-developers/weblogic-6-1.html index 7a79f4a..1a7a6f7 100644 --- a/content/core-developers/weblogic-6-1.html +++ b/content/core-developers/weblogic-6-1.html @@ -160,12 +160,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>getServletContext </code></pre> </div> -<p>, is then implemented to return the servlet context from where it is available in Servlet 2.3: the session object. The logical operation is unchanged, but now subclasses can override</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>getServletContext -</code></pre> -</div> -<p>to retrieve the servlet context from a different location as we’ll see below.</p> +<p>, is then implemented to return the servlet context from where it is available in Servlet 2.3: the session object. The logical operation is unchanged, but now subclasses can override <code class="highlighter-rouge">getServletContext</code> to retrieve the servlet context from a different location as we’ll see below.</p> <ol> <li><strong>SessionLifecycleListener</strong> is modified in the same way as RequestLifecycleFilter. The method,</li> @@ -174,12 +169,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>getServletContext </code></pre> </div> -<p>, is implemented to return the servlet context, in this case also from the session object. Again, subclasses can override the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>getServletContext -</code></pre> -</div> -<p>method to restore the servlet context from a different source. Again, this class’s functionality is unchanged.</p> +<p>, is implemented to return the servlet context, in this case also from the session object. Again, subclasses can override the <code class="highlighter-rouge">getServletContext</code> method to restore the servlet context from a different source. Again, this class’s functionality is unchanged.</p> <p>Now, in a separate project, the following classes are added and compiled into a separate JAR:</p> @@ -233,21 +223,12 @@ <p><strong>I still get the AbstractMethodError Exception when Weblogic Server starts up. What am I doing wrong?</strong></p> <ol> - <li>Check to see if a</li> -</ol> - -<div class="highlighter-rouge"><pre class="highlight"><code>action2-example.war -</code></pre> -</div> -<p>is still lingering in your</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>mydomain/applications -</code></pre> -</div> -<p>folder and delete it if it is there.</p> - -<ol> - <li>See next FAQ question.</li> + <li> + <p>Check to see if a <code class="highlighter-rouge">action2-example.war</code> is still lingering in your <code class="highlighter-rouge">mydomain/applications</code> folder and delete it if it is there.</p> + </li> + <li> + <p>See next FAQ question.</p> + </li> </ol> <p><strong>The server behavior seems like it is from a previous source code base; I can’t debug it. What’s the clue?</strong></p> diff --git a/content/core-developers/weblogic.html b/content/core-developers/weblogic.html index f6b5906..00c5abc 100644 --- a/content/core-developers/weblogic.html +++ b/content/core-developers/weblogic.html @@ -146,21 +146,13 @@ <h2 id="adding-an-struts-velocityproperties-configuration-file">Adding an struts-velocity.properties Configuration File</h2> <ul> - <li>In the</li> -</ul> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.properties -</code></pre> -</div> -<p>file (usually kept in the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>WEB-INF/classes -</code></pre> -</div> -<p>directory), add an entry that specifies a Velocity configuation file.</p> + <li> + <p>In the <code class="highlighter-rouge">struts.properties</code> file (usually kept in the <code class="highlighter-rouge">WEB-INF/classes</code> directory), add an entry that specifies a Velocity configuation file.</p> -<ul> - <li></li> + <ul> + <li></li> + </ul> + </li> </ul> <p><strong>struts.properties</strong></p> @@ -172,37 +164,23 @@ struts.velocity.configfile = struts-velocity.properties </div> <ul> - <li>Create the corresponding Velocity properties file (“struts-velocity.properties”), preferably in the same location as the</li> -</ul> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.properties -</code></pre> -</div> -<p>file.</p> - -<ul> - <li>Copy into the Velocity properties file the contents of the</li> + <li> + <p>Create the corresponding Velocity properties file (“struts-velocity.properties”), preferably in the same location as the <code class="highlighter-rouge">struts.properties</code> file.</p> + </li> + <li> + <p>Copy into the Velocity properties file the contents of the <code class="highlighter-rouge">velocity.properties</code> file that is the the SAF</p> + </li> </ul> -<div class="highlighter-rouge"><pre class="highlight"><code>velocity.properties -</code></pre> -</div> -<p>file that is the the SAF</p> - <div class="highlighter-rouge"><pre class="highlight"><code>velocity-dep.jar </code></pre> </div> <p>.</p> <ul> - <li>In your new</li> + <li>In your new <code class="highlighter-rouge">struts-velocity.properties</code> file, find he section titled “</li> </ul> -<div class="highlighter-rouge"><pre class="highlight"><code>struts-velocity.properties -</code></pre> -</div> -<p>file, find he section titled “</p> - <div class="highlighter-rouge"><pre class="highlight"><code>T E M P L A T E L O A D E R S </code></pre> </div> diff --git a/content/core-developers/zero-configuration.html b/content/core-developers/zero-configuration.html index 9397969..15cc2f7 100644 --- a/content/core-developers/zero-configuration.html +++ b/content/core-developers/zero-configuration.html @@ -177,12 +177,7 @@ <h2 id="action-and-package-name">Action and Package name</h2> -<p>The subpackage name makes the namespace, and the action class name makes the action name. If there is an “Action” suffix, it is dropped before creating the action name. Therefore, if the configured package is <em>com.myapp.actions</em> and the Action is <em>com.myapp.actions.</em> <strong>member</strong>.EditAction, you can access it via <a href="http://server/myapp/member/edit\.action">http://server/myapp/member/edit.action</a>. For multi-word actions, the first letter is lower-ca [...] - -<div class="highlighter-rouge"><pre class="highlight"><code>MyCustomAction -</code></pre> -</div> -<p>will map to</p> +<p>The subpackage name makes the namespace, and the action class name makes the action name. If there is an “Action” suffix, it is dropped before creating the action name. Therefore, if the configured package is <em>com.myapp.actions</em> and the Action is <em>com.myapp.actions.</em> <strong>member</strong>.EditAction, you can access it via <a href="http://server/myapp/member/edit\.action">http://server/myapp/member/edit.action</a>. For multi-word actions, the first letter is lower-ca [...] <div class="highlighter-rouge"><pre class="highlight"><code>myCustom.action </code></pre> @@ -199,19 +194,9 @@ <h2 id="parent-package">Parent Package</h2> -<p>The <a href="#PAGE_68490">ParentPackage Annotation</a> configures the XWork package (an XWork package is created per Java package) to extend one or more defined packages. The best place for this annotation is on the package via the</p> +<p>The <a href="#PAGE_68490">ParentPackage Annotation</a> configures the XWork package (an XWork package is created per Java package) to extend one or more defined packages. The best place for this annotation is on the package via the <code class="highlighter-rouge">package-info.java</code> file, however, for backward-compatibility, they can be specified on one or more Actions in the package. To determine which parent packages should be set, first, it looks for the package annotation, t [...] -<div class="highlighter-rouge"><pre class="highlight"><code>package-info.java -</code></pre> -</div> -<p>file, however, for backward-compatibility, they can be specified on one or more Actions in the package. To determine which parent packages should be set, first, it looks for the package annotation, then adds the action annotations as they are loaded. Because the load order of Actions is undetermined, it is highly recommended you avoid putting the @ParentPackage annotation on Action classes themselves.</p> - -<p>For example, if you wanted to set the parent package for the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>com.mycompany.myapp.actions -</code></pre> -</div> -<p>package, create this package-info.java file:</p> +<p>For example, if you wanted to set the parent package for the <code class="highlighter-rouge">com.mycompany.myapp.actions</code> package, create this package-info.java file:</p> <div class="highlighter-rouge"><pre class="highlight"><code> @ParentPackage("my-parent-package") diff --git a/content/tag-developers/form-tags.html b/content/tag-developers/form-tags.html index f0fda9a..812feb5 100644 --- a/content/tag-developers/form-tags.html +++ b/content/tag-developers/form-tags.html @@ -184,12 +184,7 @@ <p><strong>Simple theme caveats</strong></p> -<p>The downside of using the simple theme is that it doesn’t support as many of the attributes that the other themes do. For example, the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>label -</code></pre> -</div> -<p>attribute does nothing in the simple theme, and the automatic display of error messages is not supported.</p> +<p>The downside of using the simple theme is that it doesn’t support as many of the attributes that the other themes do. For example, the <code class="highlighter-rouge">label</code> attribute does nothing in the simple theme, and the automatic display of error messages is not supported.</p> <p><strong>Common Attributes</strong></p> @@ -205,12 +200,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>form </code></pre> </div> -<p>(${parameters.form}). The</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>form -</code></pre> -</div> -<p>property represents the attributes used to render the form tag, such as the form’s id. In a template, the form’s ID can be found by calling ${parameters.form.id}.</p> +<p>(${parameters.form}). The <code class="highlighter-rouge">form</code> property represents the attributes used to render the form tag, such as the form’s id. In a template, the form’s ID can be found by calling ${parameters.form.id}.</p> <p><strong>Template-Related Attributes</strong></p> @@ -517,37 +507,12 @@ __General Attributes__ __Value/Name Relationship__ -In many of the tags (except for the form tag) there is a unique relationship between the - -~~~~~~~ -name -~~~~~~~ - and - -~~~~~~~ -value -~~~~~~~ - attributes. The - -~~~~~~~ -name -~~~~~~~ - attribute provides the name for the tag, which in turn is used as the control attribute when the form is submitted. The value submitted is bound to the - -~~~~~~~ -name -~~~~~~~ -. In most cases, the +In many of the tags (except for the form tag) there is a unique relationship between the `name` and `value` attributes. The `name` attribute provides the name for the tag, which in turn is used as the control attribute when the form is submitted. The value submitted is bound to the ~~~~~~~ name ~~~~~~~ - maps to a simple JavaBean property, such as "postalCode". On a submit, the value would be set to the property by calling the - -~~~~~~~ -setPostalCode -~~~~~~~ - mutator. +. In most cases, the `name` maps to a simple JavaBean property, such as "postalCode". On a submit, the value would be set to the property by calling the `setPostalCode` mutator. Likewise, a form control could be populated by calling a JavaBean accessor, like @@ -570,27 +535,12 @@ getPostalCode ~~~~~~~ -However, since the tags imply a relationship between the - -~~~~~~~ -name -~~~~~~~ - and +However, since the tags imply a relationship between the `name` and ~~~~~~~ value ~~~~~~~ -, the - -~~~~~~~ -value -~~~~~~~ - attribute is optional. If a - -~~~~~~~ -value -~~~~~~~ - is not specified, by default, the JavaBean accessor is used instead. +, the `value` attribute is optional. If a `value` is not specified, by default, the JavaBean accessor is used instead. ~~~~~~~ @@ -601,32 +551,7 @@ value ~~~~~~~ -While most attributes are exposed to the underlying templates as the same key as the attribute (\${parameters.label}), the - -~~~~~~~ -value -~~~~~~~ - attribute is not. Instead, it can be accessed via the - -~~~~~~~ -nameValue -~~~~~~~ - key (\${parameters.nameValue}). The - -~~~~~~~ -nameValue -~~~~~~~ - key indicates that the value may have been generated from the - -~~~~~~~ -name -~~~~~~~ - attribute rather than explicitly defined in the - -~~~~~~~ -value -~~~~~~~ - attribute. +While most attributes are exposed to the underlying templates as the same key as the attribute (\${parameters.label}), the `value` attribute is not. Instead, it can be accessed via the `nameValue` key (\${parameters.nameValue}). The `nameValue` key indicates that the value may have been generated from the `name` attribute rather than explicitly defined in the `value` attribute. __ID Name Assignment__ @@ -662,12 +587,7 @@ labelposition __Required Attribute__ -The - -~~~~~~~ -required -~~~~~~~ - attribute on many UI tags defaults to true only if you have client-side validation enabled, and a validator is associated with that particular field. +The `required` attribute on many UI tags defaults to true only if you have client-side validation enabled, and a validator is associated with that particular field. __Tooltip__ diff --git a/content/tag-developers/tag-syntax.html b/content/tag-developers/tag-syntax.html index 8d52694..d4405ac 100644 --- a/content/tag-developers/tag-syntax.html +++ b/content/tag-developers/tag-syntax.html @@ -150,12 +150,7 @@ </code></pre> </div> -<p>The expression language (<a href="#PAGE_14198">OGNL</a>) lets us call methods and evaluate properties. The method</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>getText -</code></pre> -</div> -<p>is provided by ActionSupport, which is the base class for most Actions. Since the Action is on the stack, we can call any of its methods from an expression, including</p> +<p>The expression language (<a href="#PAGE_14198">OGNL</a>) lets us call methods and evaluate properties. The method <code class="highlighter-rouge">getText</code> is provided by ActionSupport, which is the base class for most Actions. Since the Action is on the stack, we can call any of its methods from an expression, including</p> <div class="highlighter-rouge"><pre class="highlight"><code>getText </code></pre> @@ -164,12 +159,7 @@ <h2 id="non-string-attributes">Non-String Attributes</h2> -<p>The HTTP protocol is text-based, but some tags have non-String attribute types, like</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>bool -</code></pre> -</div> -<p>or</p> +<p>The HTTP protocol is text-based, but some tags have non-String attribute types, like <code class="highlighter-rouge">bool</code> or</p> <div class="highlighter-rouge"><pre class="highlight"><code>int </code></pre> @@ -184,12 +174,7 @@ </code></pre> </div> -<p>Since the attribute</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>multiple -</code></pre> -</div> -<p>maps to a boolean property, the framework does not interpret the value as a String. The value is evaluated as an expression and automtically converted to a boolean.</p> +<p>Since the attribute <code class="highlighter-rouge">multiple</code> maps to a boolean property, the framework does not interpret the value as a String. The value is evaluated as an expression and automtically converted to a boolean.</p> <p>Since it’s easy to forget which attributes are String and which are non-String, you can still use the escape notation.</p> @@ -219,44 +204,19 @@ <h2 id="value-is-an-object">value is an Object!</h2> -<p>Most often, the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>value -</code></pre> -</div> -<p>attribute is set automatically, since</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>name -</code></pre> -</div> -<p>attribute usually tells the framework which property to call to set the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>value -</code></pre> -</div> -<p>. But, if there is a reason to set the</p> +<p>Most often, the <code class="highlighter-rouge">value</code> attribute is set automatically, since <code class="highlighter-rouge">name</code> attribute usually tells the framework which property to call to set the</p> <div class="highlighter-rouge"><pre class="highlight"><code>value </code></pre> </div> -<p>directly, be advised that</p> +<p>. But, if there is a reason to set the <code class="highlighter-rouge">value</code> directly, be advised that</p> <div class="highlighter-rouge"><pre class="highlight"><code>value </code></pre> </div> <p><strong>is an Object</strong><strong><em>NOT</em> **</strong>a String**.</p> -<p>(!) Since</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>value -</code></pre> -</div> -<p>is not a String, whatever is passed to</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>value -</code></pre> -</div> -<p>is evaluated as an expression - <strong>NOT</strong> a String literal.</p> +<p>(!) Since <code class="highlighter-rouge">value</code> is not a String, whatever is passed to <code class="highlighter-rouge">value</code> is evaluated as an expression - <strong>NOT</strong> a String literal.</p> <p><strong>Probably wrong!</strong></p> @@ -266,12 +226,7 @@ </code></pre> </div> -<p>If a</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>textfield -</code></pre> -</div> -<p>is passed the value attribute</p> +<p>If a <code class="highlighter-rouge">textfield</code> is passed the value attribute</p> <div class="highlighter-rouge"><pre class="highlight"><code>"ca" </code></pre> diff --git a/content/tag-developers/velocity.html b/content/tag-developers/velocity.html index 2b1137e..9de9518 100644 --- a/content/tag-developers/velocity.html +++ b/content/tag-developers/velocity.html @@ -179,12 +179,7 @@ Hello, ${name} </code></pre> </div> -<p>Where</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>name -</code></pre> -</div> -<p>is a property on the Action class. That’s it!</p> +<p>Where <code class="highlighter-rouge">name</code> is a property on the Action class. That’s it!</p> <p>There are few more details of interest, such as how templates are loaded and variables are resolved.</p> -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].