This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-staging in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/asf-staging by this push: new 3f76d60 Updates stage by Jenkins 3f76d60 is described below commit 3f76d60717713f72147e67aee2b8bdfdf99ed995 Author: jenkins <bui...@apache.org> AuthorDate: Fri Feb 19 20:01:02 2021 +0000 Updates stage by Jenkins --- content/builds.html | 10 +- ...essing-application-session-request-objects.html | 22 +- .../ajax-client-side-validation.html | 248 +++++++++------------ .../attachments/struts2-ajax-vali-flow.png | Bin 0 -> 54364 bytes .../core-developers/client-side-validation.html | 4 +- content/core-developers/default-properties.html | 32 ++- .../pure-java-script-client-side-validation.html | 82 ++++--- content/plugins/plugins.html | 12 - content/tag-developers/action-tag.html | 2 +- content/tag-developers/bean-tag.html | 2 +- content/tag-developers/css-xhtml-theme.html | 2 +- content/tag-developers/date-tag.html | 2 +- content/tag-developers/iterator-tag.html | 2 +- content/tag-developers/set-tag.html | 11 +- content/tag-developers/simple-theme.html | 2 +- content/tag-developers/text-tag.html | 7 +- content/tag-developers/url-tag.html | 7 +- content/tag-developers/xhtml-theme.html | 2 +- content/updating-website.html | 4 +- 19 files changed, 192 insertions(+), 261 deletions(-) diff --git a/content/builds.html b/content/builds.html index 878f5d6..b8ef78a 100644 --- a/content/builds.html +++ b/content/builds.html @@ -133,7 +133,7 @@ <ul id="markdown-toc"> <li><a href="#building-apache-struts" id="markdown-toc-building-apache-struts">Building Apache Struts</a></li> - <li><a href="#nightlybuilds" id="markdown-toc-nightlybuilds">NightlyBuilds</a></li> + <li><a href="#nightly-builds" id="markdown-toc-nightly-builds">Nightly Builds</a></li> <li><a href="#test-builds" id="markdown-toc-test-builds">Test Builds</a></li> <li><a href="#maven-snapshots" id="markdown-toc-maven-snapshots">Maven Snapshots</a></li> <li><a href="#licensing-of-apache-struts-builds" id="markdown-toc-licensing-of-apache-struts-builds">Licensing of Apache Struts Builds</a></li> @@ -190,10 +190,10 @@ your own applications!)</p> <p>For more about using Maven to build Struts 1, see our <a href="http://wiki.apache.org/struts/StrutsMaintenanceMaven">Maven wiki page.</a></p> -<h2 id="nightlybuilds">NightlyBuilds</h2> +<h2 id="nightly-builds">Nightly Builds</h2> <p>As part of our continuous integration practice, we also make available each morning the -<a href="https://repository.apache.org/content/repositories/snapshots/org/apache/struts/struts2-assembly/">latest stable development build.</a></p> +<a href="https://nightlies.apache.org/x1/dist/struts/">latest stable development build.</a></p> <p><em>Again: Use at your own risk!</em></p> @@ -206,14 +206,14 @@ the <a href="#SourceCode">source code</a> instead.</p> <h2 id="test-builds">Test Builds</h2> <p>As we prepare for a new release, the project group may create interim <em>test builds</em>. When test builds are available, -we post them <a href="http://people.apache.org/builds/struts/">here</a> in binary, source and library distributions. +we post them <a href="https://dist.apache.org/repos/dist/dev/struts/">here</a> in binary, source and library distributions. Library distributions include any external dependencies needed to use a product with your application.</p> <p>A test build is made available so that it can be reviewed for quality by the Apache Struts development group. When a build is judged “ready for prime time”, it is promoted to “General Availability” status and may be made the “Best Available” release. If the group feels that a build requires more testing, then it may be marked as “Beta” release. When a test build is upgraded to “Beta” or “GA” by a vote of the project members, -we make the distribution available as a formal <a href="releases.html">release.</a></p> +we make the distribution available as a formal <a href="releases.html">release</a>.</p> <h2 id="maven-snapshots">Maven Snapshots</h2> diff --git a/content/core-developers/accessing-application-session-request-objects.html b/content/core-developers/accessing-application-session-request-objects.html index 21bf18c..5ee2287 100644 --- a/content/core-developers/accessing-application-session-request-objects.html +++ b/content/core-developers/accessing-application-session-request-objects.html @@ -144,16 +144,16 @@ <p><strong>Accessing servlet scopes</strong></p> <div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">Map</span> <span class="n">attr</span> <span class="o">=</span> <span class="o">(</span><span class="n">Map</span><span class="o">)</span> <span class="n">ActionContext</span><span class="o">.</span><span class="na">getContext</span><span class="o">().</span><span class="na">get</span><span class="o">(</span><span class="s">"attr"</span><span class="o">);</span> -<span class="n">attr</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"myId"</span><span class="o">,</span> <span class="n">myProp</span><span class="o">);</span> <span class="c1">// Page scope.</span> +<span class="n">attr</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"myId"</span><span class="o">,</span><span class="n">myProp</span><span class="o">);</span> <span class="n">Map</span> <span class="n">application</span> <span class="o">=</span> <span class="o">(</span><span class="n">Map</span><span class="o">)</span> <span class="n">ActionContext</span><span class="o">.</span><span class="na">getContext</span><span class="o">().</span><span class="na">get</span><span class="o">(</span><span class="s">"application"</span><span class="o">);</span> -<span class="n">application</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"myId"</span><span class="o">,</span> <span class="n">myProp</span><span class="o">);</span> +<span class="n">application</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"myId"</span><span class="o">,</span><span class="n">myProp</span><span class="o">);</span> <span class="n">Map</span> <span class="n">session</span> <span class="o">=</span> <span class="o">(</span><span class="n">Map</span><span class="o">)</span> <span class="n">ActionContext</span><span class="o">.</span><span class="na">getContext</span><span class="o">().</span><span class="na">get</span><span class="o">(</span><span class="s">"session"</span><span class="o">);</span> <span class="n">session</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"myId"</span><span class="o">,</span> <span class="n">myProp</span><span class="o">);</span> <span class="n">Map</span> <span class="n">request</span> <span class="o">=</span> <span class="o">(</span><span class="n">Map</span><span class="o">)</span> <span class="n">ActionContext</span><span class="o">.</span><span class="na">getContext</span><span class="o">().</span><span class="na">get</span><span class="o">(</span><span class="s">"request"</span><span class="o">);</span> -<span class="n">request</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"myId"</span><span class="o">,</span> <span class="n">myProp</span><span class="o">);</span> +<span class="n">request</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"myId"</span><span class="o">,</span><span class="n">myProp</span><span class="o">);</span> </code></pre></div></div> <blockquote> @@ -174,26 +174,18 @@ is an alternative way to access the request and response objects, with the same <h2 id="accessing-from-the-view-jsp-freemarker-etc">Accessing from the view (JSP, FreeMarker, etc.)</h2> -<p>Request and session attributes are accessed via OGNL using the <code class="highlighter-rouge">#session</code> and <code class="highlighter-rouge">#request</code> stack values. -Page attributes are accessed via OGNL using the <code class="highlighter-rouge">#attr</code> stack value, and Application attributes via -the <code class="highlighter-rouge">#application</code> stack value.</p> +<p>Request and session attributes are accessed via OGNL using the <code class="highlighter-rouge">#session</code> and <code class="highlighter-rouge">#request</code> stack values.</p> <p>The <code class="highlighter-rouge">#attr</code> stack value will search the <code class="highlighter-rouge">javax.servlet.jsp.PageContext</code> for the specified key. If the <code class="highlighter-rouge">PageContext</code> -doesn’t exist, it will search the request, session, and application scopes, in that order.</p> +doean’t exist, it will search the request, session, and application scopes, in that order.</p> -<p><strong>Accessing attributes in the Application, Session, Request, or Page scope from a JSP</strong></p> +<p><strong>Accessing the Session or Request from a JSP</strong></p> -<pre><code class="language-jsp"><p>Retrieve the attribute (property), with key myId, from the specified scope:</p> - -<s:property value="#application.myId" /> - -<s:property value="#session.myId" /> +<pre><code class="language-jsp"><s:property value="#session.myId" /> <s:property value="#request.myId" /> <s:property value="#attr.myId" /> - -<p>Reminder: #attr is for Page scope attributes first, but will search the remaining scopes, in order, seeking a match.</p> </code></pre> </section> diff --git a/content/core-developers/ajax-client-side-validation.html b/content/core-developers/ajax-client-side-validation.html index a5a06c4..9c54b93 100644 --- a/content/core-developers/ajax-client-side-validation.html +++ b/content/core-developers/ajax-client-side-validation.html @@ -127,38 +127,57 @@ <article class="container"> <section class="col-md-12"> - <a href="index.html" title="back to Core Developers Guide"><< back to Core Developers Guide</a> <a class="edit-on-gh" href="https://github.com/apache/struts-site/edit/master/source/core-developers/ajax-client-side-validation.md" title="Edit this page on GitHub">Edit on GitHub</a> - <h1 id="ajax-client-side-validation">AJAX Client Side Validation</h1> - -<p>This validation mode only works with the <em>ajax theme</em></p> + + <a href="client-side-validation" title="back to Client Side Validation"><< back to Client Side Validation</a> + + <h1 class="no_toc" id="ajax-client-side-validation">AJAX Client Side Validation</h1> + +<ul id="markdown-toc"> + <li><a href="#description" id="markdown-toc-description">Description</a></li> + <li><a href="#ajax-validation" id="markdown-toc-ajax-validation">AJAX Validation</a></li> + <li><a href="#example" id="markdown-toc-example">Example</a> <ul> + <li><a href="#create-the-action-class" id="markdown-toc-create-the-action-class">Create the action class</a></li> + <li><a href="#map-the-action" id="markdown-toc-map-the-action">Map the Action</a></li> + <li><a href="#create-the-jsp" id="markdown-toc-create-the-jsp">Create the JSP</a></li> + <li><a href="#custom-theme" id="markdown-toc-custom-theme">Custom Theme</a></li> + <li><a href="#css" id="markdown-toc-css">CSS</a></li> + <li><a href="#javascript" id="markdown-toc-javascript">JavaScript</a></li> + <li><a href="#how-it-works" id="markdown-toc-how-it-works">How it works</a></li> + <li><a href="#jsonvalidationinterceptor-parameters" id="markdown-toc-jsonvalidationinterceptor-parameters">JSONValidationInterceptor parameters</a></li> + <li><a href="#flow-chart-of-ajax-validation" id="markdown-toc-flow-chart-of-ajax-validation">Flow chart of AJAX validation</a></li> + </ul> + </li> +</ul> -<table> - <tbody> - <tr> - </tr> - </tbody> -</table> +<h2 id="description">Description</h2> -<p>AJAX-based client side validation improves upon <a href="#PAGE_14262">Pure JavaScript Client Side Validation</a> by using a combination of JavaScript, DOM manipulation, and remote server communication. Unlike the pure client side implementation, AJAX-based validation communicates with the server. This means all your validation rules that worked when submitting a form will still work within the browser.</p> +<p>AJAX-based client side validation improves upon <a href="pure-java-script-client-side-validation">Pure JavaScript Client Side Validation</a> +by using a combination of JavaScript, DOM manipulation, and remote server communication. Unlike the pure client side +implementation, AJAX-based validation communicates with the server. This means all your validation rules that worked +when submitting a form will still work within the browser.</p> -<p>The validation occurs on each <strong>onblur</strong> event for each form element. As each user types in some values and moves to the next form element, the value (and all other values previously entered) will be sent to the server for validation. The entire validation stack is run, including visitor validators and your action’s validate() method.</p> +<p>The validation occurs on each <strong>onblur</strong> event for each form element. As each user types in some values and moves to +the next form element, the value (and all other values previously entered) will be sent to the server for validation. +The entire validation stack is run, including visitor validators and your action’s <code class="highlighter-rouge">validate()</code> method.</p> <p>If there is an error, like the pure implementation, the HTML and DOM will be updated immediately.</p> -<p>For an example of this, see <em>AJAX Validation</em> .</p> - -<p><strong>AJAX Validation</strong></p> +<h2 id="ajax-validation">AJAX Validation</h2> -<p><strong>Description</strong></p> +<p>Struts provides <a href="client-side-validation">client side validation</a>(using JavaScript) for a few validators. Using AJAX +validation, all <a href="validation#bundled-validators">validators</a> available to the application on the server side can be used +without forcing the page to reload, just to show validation errors. AJAX validation has a server side, which is in included +in <a href="../plugins/json/">JSON Plugin</a> (an interceptor and a result). Client side must be handled by applications themself. +One reason for that is there are too many JavaScript frameworks and libraries. Struts has no preference which of them +you use. Previous versions of Struts included a client side which was relying on the Dojo JS framework and was located +in Struts Dojo plugin. That has been deprecated for a long time and was eventually removed.</p> -<p>Struts provides <a href="client-side-validation.html">client side validation</a>(using JavaScript) for a few validators. Using AJAX validation, all <a href="#PAGE_14292">validators</a> available to the application on the server side can be used without forcing the page to reload, just to show validation errors. AJAX validation has a server side, which is in included in <em>JSON Plugin</em> (an interceptor and a result). Client side must be handled by applictions themself. One reason [...] +<h2 id="example">Example</h2> -<p><strong>Example</strong></p> +<p>This example is taken from the Struts Showcase Application.</p> -<p>This example is taken from the Struts showcase application.</p> - -<p><strong>Create the action class</strong></p> +<h3 id="create-the-action-class">Create the action class</h3> <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">AjaxFormSubmitAction</span> <span class="kd">extends</span> <span class="n">ActionSupport</span> <span class="o">{</span> <span class="kd">private</span> <span class="n">String</span> <span class="n">requiredValidatorField</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span> @@ -254,14 +273,12 @@ <span class="o">}</span> </code></pre></div></div> -<p> </p> +<h3 id="map-the-action">Map the Action</h3> -<p><strong>Map the Action</strong></p> +<p>Note that is is not necessary when using <a href="../plugins/convention/">Convention Plugin</a>.</p> -<p>Note that is is not necessary when using <em>Convention Plugin</em> .</p> +<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd"></span> -<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp"><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"></span> - <span class="nt"><struts></span> <span class="nt"><package></span> <span class="nt"><action</span> <span class="na">name=</span><span class="s">"ajaxFormSubmit"</span> <span class="na">class=</span><span class="s">"org.apache.struts2.showcase.validation.AjaxFormSubmitAction"</span><span class="nt">></span> @@ -270,12 +287,16 @@ <span class="nt"><result</span> <span class="na">type=</span><span class="s">"jsonActionRedirect"</span><span class="nt">></span>ajaxFormSubmitSuccess<span class="nt"></result></span> <span class="nt"></action></span> <span class="nt"></package></span> - </code></pre></div></div> -<p>AJAX validation is performed by the <em>jsonValidation</em> interceptor. This interceptor is included in the <em>jsonValidationWorkflowStack</em> , and is required in order to perform AJAX validation. Normal results(input, success, etc) should be provided for the action in the case that someone tries to access the action directly, in which case normal validation will be triggered. So, how does the <em>jsonValidation</em> know that it must perform AJAX validation vs regular validatio [...] +<p>AJAX validation is performed by the <a href="../plugins/json/">jsonValidation</a> interceptor. This interceptor is included in +the <em>jsonValidationWorkflowStack</em>, and is required in order to perform AJAX validation. Normal results (input, success, etc) +should be provided for the action in the case that someone tries to access the action directly, in which case normal v +alidation will be triggered. So, how does the <em>jsonValidation</em> know that it must perform AJAX validation vs regular validation? +We will see that in a minute, but you don’t need to know that in order to use AJAX validation. Same applies for specialized + Redirect Result Type <em>jsonActionRedirect</em>.</p> -<p><strong>Create the JSP</strong></p> +<h3 id="create-the-jsp">Create the JSP</h3> <pre><code class="language-jsp"><%@taglib prefix="s" uri="/struts-tags" %> <html> @@ -303,53 +324,38 @@ <s:submit label="Submit" cssClass="btn btn-primary"/> </s:form> </body> -</html> +</html> </code></pre> <p>Things to note on this JSP:</p> <ul> - <li> - <p>The <em>form</em> tag <strong>does not</strong> have <em>validate</em> set to <em>true</em> , which would perform client validation before the AJAX validation.</p> - </li> - <li> - <p>It uses a customized theme <em>ajaxErrorContainers</em> . The default Struts themes generate HTML-Elements to show validation errors only if errors are present when page is created on server side. But in order to show validation errors that arrive later via AJAX it is necessary to have error-container elements in DOM always.</p> - </li> + <li>The <em>form</em> tag <strong>does not</strong> have <em>validate</em> set to <em>true</em>, which would perform client validation before the AJAX validation.</li> + <li>It uses a customized theme <em>ajaxErrorContainers</em>. The default Struts themes generate HTML-Elements to show validation +errors only if errors are present when page is created on server side. But in order to show validation errors that +arrive later via AJAX it is necessary to have error-container elements in DOM always.</li> </ul> -<p>What happens if validation succeeds? That depends on your request parameters and action configuration. If you are using <em>jsonActionRedirect</em> result mentioned above the action will be executed while AJAX request is active and respond with JSON providing a new URL to load. Otherwise the AJAX response will be empty and the form must be submitted a 2nd time but as usual request, not AJAX.</p> - -<table> - <tbody> - <tr> - <td>Setting <em>validate</em> to <em>true</em> in the <em>form</em> tag will enable client side, JavaScript validation, which can be used along with AJAX validation (runs before the AJAX validation).</td> - </tr> - </tbody> -</table> +<p>What happens if validation succeeds? That depends on your request parameters and action configuration. If you are using +<em>jsonActionRedirect</em> result mentioned above the action will be executed while AJAX request is active and respond with +JSON providing a new URL to load. Otherwise the AJAX response will be empty and the form must be submitted a 2nd time +but as usual request, not AJAX.</p> -<table> - <tbody> - <tr> - </tr> - </tbody> -</table> +<blockquote> + <p>Setting <em>validate</em> to <em>true</em> in the <em>form</em> tag will enable client side, JavaScript validation, which can be used along + with AJAX validation (runs before the AJAX validation).</p> +</blockquote> -<p><strong>Custom Theme</strong></p> +<h3 id="custom-theme">Custom Theme</h3> -<p>In this sample the <em>custom theme</em> is based on <em>xhtml</em> theme. It is required to override 3 FTL files.</p> +<p>In this sample the <em>custom theme</em> is based on <em>xhtml</em> theme. It is required to override 3 FTL files.</p> -<blockquote> - <p>theme.properties</p> -</blockquote> +<p><strong>theme.properties</strong></p> <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>parent = xhtml </code></pre></div></div> -<p> </p> - -<blockquote> - <p>actionerror.ftl</p> -</blockquote> +<p><strong>actionerror.ftl</strong></p> <pre><code class="language-ftl"><#-- Make sure element is always present. To be filled later via JS. @@ -377,11 +383,7 @@ </ul> </code></pre> -<p> </p> - -<blockquote> - <p>controlfooter.ftl</p> -</blockquote> +<p><strong>controlfooter.ftl</strong></p> <pre><code class="language-ftl">${parameters.after!}<#t/> </td><#lt/> @@ -402,13 +404,9 @@ </#if> </code></pre> -<p> </p> +<p><strong>controlheader-core.ftl</strong></p> -<blockquote> - <p>controlheader-core.ftl</p> -</blockquote> - -<pre><code class="language-ftl"> <#-- +<pre><code class="language-ftl"><#-- Always include elements to show errors. They may be filled later via AJAX. --> <#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/> @@ -468,9 +466,10 @@ ${parameters.labelseparator!":"?html}<#t/> </#if> </code></pre> -<p><strong>CSS</strong></p> +<h3 id="css">CSS</h3> -<p>To show users some nice visual feedback while waiting for AJAX response you can use a little CSS. Remember to include the referenced <em>indicator.gif</em> .</p> +<p>To show users some nice visual feedback while waiting for AJAX response you can use a little CSS. Remember to include +the referenced <em>indicator.gif</em>.</p> <div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.ajaxVisualFeedback</span> <span class="p">{</span> <span class="nl">width</span><span class="p">:</span> <span class="m">16px</span><span class="p">;</span> @@ -481,11 +480,10 @@ ${parameters.labelseparator!":"?html}<#t/> <span class="p">}</span> </code></pre></div></div> -<p> </p> +<h3 id="javascript">JavaScript</h3> -<p><strong>JavaScript</strong></p> - -<p>Now this is where the magic happens. Here <em>jQuery</em> is used to register an eventhandler which intercepts form submits. It takes care of hiding validation errors that might be present, submit the form via AJAX and handle JSON responses.</p> +<p>Now this is where the magic happens. Here <em>jQuery</em> is used to register an eventhandler which intercepts form submits. +It takes care of hiding validation errors that might be present, submit the form via AJAX and handle JSON responses.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="cm">/** * Validates form per AJAX. To be called as onSubmit handler. @@ -539,7 +537,7 @@ ${parameters.labelseparator!":"?html}<#t/> <span class="c1">// a real error occurred -> show user an error message</span> <span class="nx">_handleValidationResult</span><span class="p">(</span><span class="nx">_form</span><span class="p">,</span> <span class="p">{</span><span class="na">errors</span><span class="p">:</span> <span class="p">[</span><span class="s1">'Network or server error!'</span><span class="p">]})</span> <span class="p">}</span> - <span class="p">}</span> + <span class="p">}</span> <span class="p">}</span> <span class="c1">// send request, after delay to make sure everybody notices the visual feedback :)</span> <span class="nb">window</span><span class="p">.</span><span class="nx">setTimeout</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span> @@ -592,15 +590,18 @@ ${parameters.labelseparator!":"?html}<#t/> <span class="p">});</span> </code></pre></div></div> -<p> </p> - -<p><strong>How it works</strong></p> +<h3 id="how-it-works">How it works</h3> -<p><em>jsonValidation</em> interceptor must be placed on a stack, following the <em>validation</em> interceptor. The interceptor itself won’t perform any validation, but will check for validation errors on the action being invoked (assuming that the action is ValidationAware).</p> +<p><em>jsonValidation</em> interceptor must be placed on a stack, following the <em>validation</em> interceptor. The interceptor itself +won’t perform any validation, but will check for validation errors on the action being invoked (assuming that the action +is <code class="highlighter-rouge">ValidationAware</code>).</p> <p>If you just want to use AJAX validation, without knowing the implementation details, you can skip this section.</p> -<p>When the <em>jsonValidation</em> interceptor is invoked, it will look for a parameter named <em>struts.enableJSONValidation</em> , this parameter <strong>must</strong> be set to <em>true</em> , otherwise the interceptor won’t do anything. Then the interceptor will look for a parameter named <em>struts.validateOnly</em> , if this parameter exists, is set to <em>true</em> , and there are validation errors (o action errors) they will be serialized into JSON in the form:</p> +<p>When the <em>jsonValidation</em> interceptor is invoked, it will look for a parameter named <em>struts.enableJSONValidation</em>, +this parameter <strong>must</strong> be set to <em>true</em>, otherwise the interceptor won’t do anything. Then the interceptor will look +for a parameter named <em>struts.validateOnly</em>, if this parameter exists, is set to <em>true</em>, and there are validation +errors (action errors) they will be serialized into JSON in the form:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="s2">"errors"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"Global Error 1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"Global Error 2"</span><span class="p">],</span><span class="w"> @@ -609,97 +610,54 @@ ${parameters.labelseparator!":"?html}<#t/> </span><span class="s2">"field1"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"Field 2 Error 1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"Field 2 Error 2"</span><span class="p">]</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">}</span><span class="w"> - </span></code></pre></div></div> -<p>If the action implements the <em>ModelDrive</em> interface, “model.” will be stripped from the field names in the returned JSON. If validation succeeds (and <em>struts.validateOnly</em> is true), an empty JSON string will be returned:</p> +<p>If the action implements the <em>ModelDrive</em> interface, “model.” will be stripped from the field names in the returned JSON. +If validation succeeds (and <em>struts.validateOnly</em> is true), an empty JSON string will be returned:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{}</span><span class="w"> - </span></code></pre></div></div> -<p>If <em>struts.validateOnly</em> is false the action and result are executed. In this case <em>jsonActionRedirect</em> result is very useful. It creates a JSON response in the form:</p> +<p>If <em>struts.validateOnly</em> is false the action and result are executed. In this case <em>jsonActionRedirect</em> result is very +useful. It creates a JSON response in the form:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="s2">"location"</span><span class="p">:</span><span class="w"> </span><span class="s2">"<url to be loaded next>"</span><span class="p">}</span><span class="w"> - </span></code></pre></div></div> <blockquote> - + <p>Remember to set <code class="highlighter-rouge">struts.enableJSONValidation=true</code> in the request to enable AJAX validation</p> </blockquote> -<blockquote> - -</blockquote> - -<blockquote> - <p>Remember to set struts.enableJSONValidation=true in the request to enable AJAX validation</p> -</blockquote> - -<blockquote> - -</blockquote> - -<p><strong>JSONValidationInterceptor parameters</strong></p> +<h3 id="jsonvalidationinterceptor-parameters">JSONValidationInterceptor parameters</h3> <p>The following request parameters can be used to enable exposing validation errors:</p> <ul> - <li> - <p><strong>struts.enableJSONValidation</strong> - a request parameter must be set to <strong>true</strong> to use this interceptor</p> - </li> - <li> - <p><strong>struts.validateOnly</strong> - If the request has this parameter, execution will return after validation (action won’t be executed). If <strong>struts.validateOnly</strong> is set to false you may want to use <em>JSONActionRedirectResult</em></p> - </li> - <li> - <p><strong>struts.JSONValidation.no.encoding</strong> - If the request has this parameter set to <strong>true,</strong> the character encoding will <strong>NOT</strong> be set on the response - is needed in portlet environment</p> - </li> + <li><strong>struts.enableJSONValidation</strong> - a request parameter must be set to <strong>true</strong> to use this interceptor</li> + <li><strong>struts.validateOnly</strong> - If the request has this parameter, execution will return after validation (action won’t be executed). +If <strong>struts.validateOnly</strong> is set to false you may want to use <em>JSONActionRedirectResult</em></li> + <li><strong>struts.JSONValidation.no.encoding</strong> - If the request has this parameter set to <strong>true,</strong> the character encoding +will <strong>NOT</strong> be set on the response - is needed in portlet environment</li> </ul> <p>You can override names of these parameters by specifying the following parameters when setting up a stack:</p> <ul> - <li> - <p><strong>validateJsonParam</strong> - to override name of <strong>struts.enableJSONValidation</strong>** -**</p> - </li> - <li> - <p><strong>validateOnlyParam</strong> - to override name of <strong>struts.validateOnly</strong></p> - </li> - <li> - <p><strong>noEncodingSetParam</strong> - to override name of <strong>struts.JSONValidation.no.encoding</strong></p> - </li> - <li> - <p><strong>validationFailedStatus</strong> - status to be set on response when there are validation errors, by default <strong>400</strong></p> - </li> + <li><strong>validateJsonParam</strong> to override name of <strong>struts.enableJSONValidation</strong></li> + <li><strong>validateOnlyParam</strong> to override name of <strong>struts.validateOnly</strong></li> + <li><strong>noEncodingSetParam</strong> to override name of <strong>struts.JSONValidation.no.encoding</strong></li> + <li><strong>validationFailedStatus</strong> status to be set on response when there are validation errors, by default <strong>400</strong></li> </ul> -<p>** -**</p> +<p>Parameters overriding is available since Struts 2.5.9</p> -<p> Parameters overriding is available since Struts 2.5.9</p> - -<p><strong>Flow chart of AJAX validation</strong></p> +<h3 id="flow-chart-of-ajax-validation">Flow chart of AJAX validation</h3> <p>Some details are omitted, like results used.</p> -<table> - <tbody> - <tr> - </tr> - </tbody> -</table> - <p>As explained above: there is a case where form is submitted twice, one time as AJAX with validation only and another time as usual submit.</p> -<table> - <tbody> - <tr> - </tr> - </tbody> -</table> - -<p><em>struts2-ajax-vali-flow.png</em></p> +<p><img src="attachments/struts2-ajax-vali-flow.png" alt="" /></p> </section> </article> diff --git a/content/core-developers/attachments/struts2-ajax-vali-flow.png b/content/core-developers/attachments/struts2-ajax-vali-flow.png new file mode 100644 index 0000000..8da0331 Binary files /dev/null and b/content/core-developers/attachments/struts2-ajax-vali-flow.png differ diff --git a/content/core-developers/client-side-validation.html b/content/core-developers/client-side-validation.html index 7cfdafc..0bc7c98 100644 --- a/content/core-developers/client-side-validation.html +++ b/content/core-developers/client-side-validation.html @@ -129,7 +129,7 @@ <section class="col-md-12"> <a class="edit-on-gh" href="https://github.com/apache/struts-site/edit/master/source/core-developers/client-side-validation.md" title="Edit this page on GitHub">Edit on GitHub</a> - <a href="validation.html" title="back to Validation"><< back to Validation</a> + <a href="validation" title="back to Validation"><< back to Validation</a> <h1 class="no_toc" id="client-side-validation">Client Side Validation</h1> @@ -199,7 +199,7 @@ if the validation system actually “requires” the field or not.</p> <tbody> <tr> <td><a href="ajax-client-side-validation">AJAX Client Side Validation</a></td> - <td>Used by the <em>ajax theme</em></td> + <td>Use to used by the <em>ajax theme</em></td> </tr> </tbody> </table> diff --git a/content/core-developers/default-properties.html b/content/core-developers/default-properties.html index 0b3762f..a004ecb 100644 --- a/content/core-developers/default-properties.html +++ b/content/core-developers/default-properties.html @@ -164,7 +164,7 @@ on the classpath, but it is typically found under <code class="highlighter-rouge ### START SNIPPET: complete_file ### Struts default properties -###(can be overridden by a struts.properties file in the root of the classpath) +### (can be overridden by a struts.properties file in the root of the classpath) ### ### This can be used to set your default locale and encoding scheme @@ -202,15 +202,15 @@ struts.objectFactory.spring.enableAopSupport = false ### using generics. com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer was deprecated since XWork 2, it's ### functions are integrated in DefaultObjectTypeDeterminer now. ### To disable tiger support use the "notiger" property value here. -#struts.objectTypeDeterminer = tiger -#struts.objectTypeDeterminer = notiger +# struts.objectTypeDeterminer = tiger +# struts.objectTypeDeterminer = notiger ### Parser to handle HTTP POST requests, encoded using the MIME-type multipart/form-data # struts.multipart.parser=cos # struts.multipart.parser=pell # struts.multipart.parser=jakarta-stream struts.multipart.parser=jakarta -# uses javax.servlet.context.tempdir by default +### Uses javax.servlet.context.tempdir by default struts.multipart.saveDir= struts.multipart.maxSize=2097152 @@ -219,7 +219,7 @@ struts.multipart.maxSize=2097152 ### How request URLs are mapped to and from actions ### Vy default 'struts' name is used which maps to DefaultActionMapper -#struts.mapper.class=restful +# struts.mapper.class=restful ### Used by the DefaultActionMapper ### You may provide a comma separated list, e.g. struts.action.extension=action,jnlp,do @@ -228,11 +228,15 @@ struts.multipart.maxSize=2097152 ### prior to a comma e.g. struts.action.extension=, or struts.action.extension=x,y,z,, struts.action.extension=action,, -### Used by FilterDispatcher +### Used by Dispatcher ### If true then Struts serves static content from inside its jar. -### If false then the static content must be available at <context_path>/struts +### If false then the static content must be available at <context_path>/static struts.serve.static=true +### A path from which a static content is served, it must start with "/" +### and it cannot end with "/" +struts.ui.staticContentPath=/static + ### Used by FilterDispatcher ### This is good for development where one wants changes to the static content be ### fetch on each request. @@ -281,7 +285,7 @@ struts.devMode = false ### when set to true, resource bundles will be reloaded on _every_ request. ### this is good during development, but should never be used in production -### struts.i18n.reload=false +# struts.i18n.reload=false ### Standard UI theme ### Change this to reflect which path should be used for JSP control tag templates by default @@ -289,12 +293,12 @@ struts.ui.theme=xhtml struts.ui.templateDir=template ### Change this to use a different token to indicate template theme expansion struts.ui.theme.expansion.token=~~~ -#sets the default template type. Either ftl, vm, or jsp +### Sets the default template type. Either ftl, vm, or jsp struts.ui.templateSuffix=ftl ### Configuration reloading ### This will cause the configuration to reload struts.xml when it is changed -### struts.configuration.xml.reload=false +# struts.configuration.xml.reload=false ### Location of velocity.properties file. defaults to velocity.properties struts.velocity.configfile = velocity.properties @@ -314,6 +318,10 @@ struts.url.includeParams = none ### Load custom default resource bundles # struts.custom.i18n.resources=testmessages,testmessages2 +### Control whether to search the default resource bundes for messages first (if true) or not (if false). +### Default is false (when not set). +# struts.i18n.search.defaultbundles.first=false + ### workaround for some app servers that don't handle HttpServletRequest.getParameterMap() ### often used for WebLogic, Orion, and OC4J struts.dispatcher.parametersWorkaround = false @@ -321,11 +329,11 @@ struts.dispatcher.parametersWorkaround = false ### configure the Freemarker Manager class to be used ### Allows user to plug-in customised Freemarker Manager if necessary ### MUST extends off org.apache.struts2.views.freemarker.FreemarkerManager -#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager +# struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager ### Enables caching of FreeMarker templates ### Has the same effect as copying the templates under WEB_APP/templates -### struts.freemarker.templatesCache=false +# struts.freemarker.templatesCache=false ### Enables caching of models on the BeanWrapper struts.freemarker.beanwrapperCache=false 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 e10d5e6..394b339 100644 --- a/content/core-developers/pure-java-script-client-side-validation.html +++ b/content/core-developers/pure-java-script-client-side-validation.html @@ -127,64 +127,60 @@ <article class="container"> <section class="col-md-12"> - <a href="index.html" title="back to Core Developers Guide"><< back to Core Developers Guide</a> <a class="edit-on-gh" href="https://github.com/apache/struts-site/edit/master/source/core-developers/pure-java-script-client-side-validation.md" title="Edit this page on GitHub">Edit on GitHub</a> - <h1 id="pure-javascript-client-side-validation">Pure JavaScript Client Side Validation</h1> + + <a href="client-side-validation" title="back to Client Side Validation"><< back to Client Side Validation</a> + + <h1 class="no_toc" id="pure-javascript-client-side-validation">Pure JavaScript Client Side Validation</h1> -<p>Pure JavaScript client side validation is the simplest but least feature-rich type of <a href="client-side-validation.html">Client Side Validation</a>. -This type of validation uses 100% client-side JavaScript code to try to validate the values entered by the user. -Because the validation logic is actually repeated in the JavaScript code, it is important to understand that -some values will be considered acceptable by the JavaScript code but will be marked as unacceptable by the server-side <a href="validation.html">Validation</a>.</p> - -<p>Only the following validators are supported: -* required validator -* requiredstring validator -* stringlength validator -* regex validator -* email validator -* url validator -* int validator -* double validator -</p> +<ul id="markdown-toc"> + <li><a href="#description" id="markdown-toc-description">Description</a></li> + <li><a href="#error-reporting" id="markdown-toc-error-reporting">Error reporting</a></li> + <li><a href="#additional-validator-support" id="markdown-toc-additional-validator-support">Additional Validator Support</a></li> +</ul> -<blockquote> +<h2 id="description">Description</h2> -</blockquote> +<p>Pure JavaScript client side validation is the simplest but least feature-rich type of <a href="client-side-validation">Client Side Validation</a>. +This type of validation uses 100% client-side JavaScript code to try to validate the values entered by the user. +Because the validation logic is actually repeated in the JavaScript code, it is important to understand that +some values will be considered acceptable by the JavaScript code but will be marked as unacceptable by the server-side <a href="validation">Validation</a>.</p> -<blockquote> +<p>Only the following validators are supported:</p> -</blockquote> +<ul> + <li>required validator</li> + <li>requiredstring validator</li> + <li>stringlength validator</li> + <li>regex validator</li> + <li>email validator</li> + <li>url validator</li> + <li>int validator</li> + <li>double validator</li> +</ul> <blockquote> <p>JavaScript client validation is not available for visitor validations.</p> </blockquote> -<blockquote> - -</blockquote> - -<p><strong>Error reporting</strong></p> +<h2 id="error-reporting">Error reporting</h2> -<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> +<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> - <tr> - <td>Errors are reported using the default validation message, not the internationalized version that the server-side might be aware of. This is a known issue. You may want to try the <a href="ajax-client-side-validation.html">AJAX Client Side Validation</a> for messages that are fully internationalized.</td> - </tr> - </tbody> -</table> - -<table> - <tbody> - <tr> - </tr> - </tbody> -</table> +<blockquote> + <p>Errors are reported using the default validation message, not the internationalized version that the server-side might +be aware of. This is a known issue. You may want to try the <a href="ajax-client-side-validation">AJAX Client Side Validation</a> +for messages that are fully internationalized.</p> +</blockquote> -<p><strong>Additional Validator Support</strong></p> +<h2 id="additional-validator-support">Additional Validator Support</h2> -<p>If you wish to add additional validator support beyond those listed, you may override the <em>xhtml theme</em> teamplte <code class="highlighter-rouge">form-close-validate.ftl</code>. This file contains the JavaScript that tries to validate each user-entered value from within the browswer. The <em>css_xhtml theme</em> extends the <em>xhtml theme</em> and therefore doesn’t have it’s own form-close-validate.ftl template.</p> +<p>If you wish to add additional validator support beyond those listed, you may override the <em>xhtml theme</em> template +<code class="highlighter-rouge">form-close-validate.ftl</code>. This file contains the JavaScript that tries to validate each user-entered value from within +the browser. The <em>css_xhtml theme</em> extends the <em>xhtml theme</em> and therefore doesn’t have its own <code class="highlighter-rouge">form-close-validate.ftl</code> +template.</p> </section> </article> diff --git a/content/plugins/plugins.html b/content/plugins/plugins.html index 900a20a..8f8d99f 100644 --- a/content/plugins/plugins.html +++ b/content/plugins/plugins.html @@ -329,18 +329,6 @@ <td>com.opensymphony.xwork2.conversion.impl.XWorkConverter</td> </tr> <tr> - <td>struts.xworkTextProvider</td> - <td>Allows provide custom TextProvider for whole application</td> - <td>default</td> - <td>com.opensymphony.xwork2.TextProvider</td> - </tr> - <tr> - <td>struts.localeProvider</td> - <td>DEPRECATED! Allows provide custom TextProvider for whole application - instead this endpoint use <strong>struts.localeProviderFactory</strong></td> - <td>singleton</td> - <td>com.opensymphony.xwork2.LocaleProvider</td> - </tr> - <tr> <td>struts.localeProviderFactory</td> <td>Allows provide custom LocaleProvider for whole application</td> <td>singleton</td> diff --git a/content/tag-developers/action-tag.html b/content/tag-developers/action-tag.html index 7abc1a7..9175121 100644 --- a/content/tag-developers/action-tag.html +++ b/content/tag-developers/action-tag.html @@ -231,7 +231,7 @@ Is "myAction" null outside the tag? false <td align="left" valign="top"></td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Name used to reference the value pushed into the Value Stack</td> + <td align="left" valign="top">Name used to reference the value pushed into the Value Stack (scope: action).</td> </tr> </table> diff --git a/content/tag-developers/bean-tag.html b/content/tag-developers/bean-tag.html index c937fdf..f9a0d52 100644 --- a/content/tag-developers/bean-tag.html +++ b/content/tag-developers/bean-tag.html @@ -175,7 +175,7 @@ of <a href="param-tag">param</a> elements to set any mutator methods on that cla <td align="left" valign="top"></td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Name used to reference the value pushed into the Value Stack</td> + <td align="left" valign="top">Name used to reference the value pushed into the Value Stack (scope: action).</td> </tr> </table> diff --git a/content/tag-developers/css-xhtml-theme.html b/content/tag-developers/css-xhtml-theme.html index 6a2aad2..eb9f02b 100644 --- a/content/tag-developers/css-xhtml-theme.html +++ b/content/tag-developers/css-xhtml-theme.html @@ -328,7 +328,7 @@ to provide the layout. The contents of <strong>head.ftl</strong> are:</p> * under the License. */ --> -<link <#include "/${parameters.templateDir}/simple/nonce.ftl" /> rel="stylesheet" href="<@s.url value='/struts/css_xhtml/styles.css' includeParams='none' encode='false' />" type="text/css" /> +<link <#include "/${parameters.templateDir}/simple/nonce.ftl" /> rel="stylesheet" href="<@s.url value='${parameters.staticContentPath}/css_xhtml/styles.css' includeParams='none' encode='false' />" type="text/css" /> <#include "/${parameters.templateDir}/simple/head.ftl" /></code></pre></figure> <p>The head includes a style sheet. The contents of <strong>styles.css</strong> are:</p> diff --git a/content/tag-developers/date-tag.html b/content/tag-developers/date-tag.html index 911583c..a204910 100644 --- a/content/tag-developers/date-tag.html +++ b/content/tag-developers/date-tag.html @@ -274,7 +274,7 @@ and the format attribute.</p> <td align="left" valign="top"></td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Name used to reference the value pushed into the Value Stack</td> + <td align="left" valign="top">Name used to reference the value pushed into the Value Stack (scope: action).</td> </tr> </table> diff --git a/content/tag-developers/iterator-tag.html b/content/tag-developers/iterator-tag.html index d448557..482feb8 100644 --- a/content/tag-developers/iterator-tag.html +++ b/content/tag-developers/iterator-tag.html @@ -210,7 +210,7 @@ The <code class="highlighter-rouge">begin</code>, <code class="highlighter-rouge <td align="left" valign="top"></td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Name used to reference the value pushed into the Value Stack</td> + <td align="left" valign="top">Name used to reference the value pushed into the Value Stack (scope: action).</td> </tr> </table> diff --git a/content/tag-developers/set-tag.html b/content/tag-developers/set-tag.html index 11d9502..5b709b2 100644 --- a/content/tag-developers/set-tag.html +++ b/content/tag-developers/set-tag.html @@ -150,13 +150,12 @@ the body evaluates is set as value for the scoped variable.</p> <li><code class="highlighter-rouge">application</code> - the value will be set in application scope according to servlet spec. using the name as its key</li> <li><code class="highlighter-rouge">session</code> - the value will be set in session scope according to servlet spec. using the name as key</li> <li><code class="highlighter-rouge">request</code> - the value will be set in request scope according to servlet spec. using the name as key</li> - <li><code class="highlighter-rouge">page</code> - the value will be set in page scope according to servlet spec. using the name as key (retrieve via #attr)</li> - <li><code class="highlighter-rouge">action</code> - the value will be set in the page scope and Struts’ action context using the name as key</li> + <li><code class="highlighter-rouge">page</code> - the value will be set in page scope according to servlet spec. using the name as key</li> + <li><code class="highlighter-rouge">action</code> - the value will be set in the request scope and Struts’ action context using the name as key</li> </ul> <blockquote> - <p><strong>NOTE</strong>: If no scope is specified, it will default to <code class="highlighter-rouge">action</code> scope. For the <code class="highlighter-rouge">set</code> tag <strong>specifically</strong>, this also -places (sets) the generated value into the <code class="highlighter-rouge">page</code> scope as well (retrieve via #attr).</p> + <p><strong>NOTE</strong>: If no scope is specified, it will default to <code class="highlighter-rouge">action</code> scope.</p> </blockquote> <p>Assigns a value to a variable in a specified scope</p> @@ -184,7 +183,7 @@ places (sets) the generated value into the <code class="highlighter-rouge">page< <td align="left" valign="top">action</td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">The scope in which to assign the variable. Can be <b>application</b>, <b>session</b>, <b>request</b>, <b>page</b>, or <b>action</b>.</td> + <td align="left" valign="top">The scope in which to assign the variable. Can be <b>application</b>, <b>session</b>, <b>request</b>, <b>page</b>, or <b>action</b> (action scope <em>also</em> adds it to the page scope).</td> </tr> <tr> <td align="left" valign="top">trimBody</td> @@ -208,7 +207,7 @@ places (sets) the generated value into the <code class="highlighter-rouge">page< <td align="left" valign="top"></td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Name used to reference the value pushed into the Value Stack</td> + <td align="left" valign="top">Name used to reference the value pushed into the Value Stack (default scope: action,<em>override</em> with the scope attribute).</td> </tr> </table> diff --git a/content/tag-developers/simple-theme.html b/content/tag-developers/simple-theme.html index 2b2b1f8..78d1129 100644 --- a/content/tag-developers/simple-theme.html +++ b/content/tag-developers/simple-theme.html @@ -181,7 +181,7 @@ Ajax/Dojo support so that tags can import Dojo widgets easily.</p> * under the License. */ --> -<script src="${base}/struts/utils.js" type="text/javascript" <#include "/${parameters.templateDir}/simple/nonce.ftl" /> ></script></code></pre></figure> +<script src="${base}${parameters.staticContentPath}/utils.js" type="text/javascript" <#include "/${parameters.templateDir}/simple/nonce.ftl" /> ></script></code></pre></figure> </section> diff --git a/content/tag-developers/text-tag.html b/content/tag-developers/text-tag.html index d7cd171..5f16c5b 100644 --- a/content/tag-developers/text-tag.html +++ b/content/tag-developers/text-tag.html @@ -214,15 +214,10 @@ If no value is found on the stack, the key of the message will be written out.</ <td align="left" valign="top"></td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Name used to reference the value pushed into the Value Stack</td> + <td align="left" valign="top">Name used to reference the value pushed into the Value Stack (scope: action).</td> </tr> </table> -<blockquote> - <p><strong>NOTE</strong>: When the <code class="highlighter-rouge">var</code> attribute is used with the <code class="highlighter-rouge">text</code> tag, the tag’s generated value <strong>will not</strong> be written out to the -visible page (it will only be placed into the action scope).</p> -</blockquote> - <h2 id="examples">Examples</h2> <blockquote> diff --git a/content/tag-developers/url-tag.html b/content/tag-developers/url-tag.html index 6306d5b..6587c71 100644 --- a/content/tag-developers/url-tag.html +++ b/content/tag-developers/url-tag.html @@ -309,7 +309,7 @@ because the parameter defined in the <code class="highlighter-rouge">param</code <td align="left" valign="top"></td> <td align="left" valign="top">false</td> <td align="left" valign="top">String</td> - <td align="left" valign="top">Name used to reference the value pushed into the Value Stack</td> + <td align="left" valign="top">Name used to reference the value pushed into the Value Stack (scope: action).</td> </tr> <tr> <td align="left" valign="top">windowState</td> @@ -321,11 +321,6 @@ because the parameter defined in the <code class="highlighter-rouge">param</code </tr> </table> -<blockquote> - <p><strong>NOTE</strong>: When the <code class="highlighter-rouge">var</code> attribute is used with the <code class="highlighter-rouge">url</code> tag, the tag’s generated URL value will be placed into the request scope -<strong>in addition to</strong> the action scope.</p> -</blockquote> - <h2 id="examples">Examples</h2> <pre><code class="language-jsp"><!-- Example 1 --> diff --git a/content/tag-developers/xhtml-theme.html b/content/tag-developers/xhtml-theme.html index 50499ca..772ff56 100644 --- a/content/tag-developers/xhtml-theme.html +++ b/content/tag-developers/xhtml-theme.html @@ -392,7 +392,7 @@ render the form elements.</p> * under the License. */ --> -<link rel="stylesheet" href="<@s.url value='/struts/xhtml/styles.css' includeParams='none' encode='false'/>" type="text/css" <#include "/${parameters.templateDir}/simple/nonce.ftl" /> /> +<link rel="stylesheet" href="<@s.url value='${parameters.staticContentPath}/xhtml/styles.css' includeParams='none' encode='false'/>" type="text/css" <#include "/${parameters.templateDir}/simple/nonce.ftl" /> /> <#include "/${parameters.templateDir}/simple/head.ftl" /></code></pre></figure> <p>The head template imports a style sheet. The contents of <strong>styles.css</strong> are:</p> diff --git a/content/updating-website.html b/content/updating-website.html index 1e8cf4d..5eb842b 100644 --- a/content/updating-website.html +++ b/content/updating-website.html @@ -155,7 +155,7 @@ by a CI server.</p> <p>The whole build of the website is orchestrated by <a href="http://s.apache.org/asfyaml">.asf.yaml</a>, please refer to the docs for more details. The main build of the website is performed by <a href="https://ci2.apache.org/#/builders/7">a buildbot job</a>, the staging site is build and deployed by -<a href="https://ci-builds.apache.org/job/Struts/job/Struts-staged-site/">a Jenkins job</a> - buildbot doesn’t support staging site deployment yet.</p> +<a href="https://builds.apache.org/job/Struts/job/Struts-staged-site/">a Jenkins job</a> - buildbot doesn’t support staging site deployment yet.</p> <h2 id="applying-a-change">Applying a change</h2> @@ -166,7 +166,7 @@ please open a Pull Request. The Pull Request will be automatically build and dep <h2 id="deploying-javadocs">Deploying JavaDocs</h2> -<p>There is a dedicated <a href="https://ci-builds.apache.org/job/Struts/job/Struts-site-javadocs/">Jenkins job</a> which is +<p>There is a dedicated <a href="https://builds.apache.org/job/Struts/job/Struts-site-javadocs/">Jenkins job</a> which is used to update the JavaDocs based on the latest release. If you have a proper privileges you can start the job and provide a Git tag of the latest release, eg. <code class="highlighter-rouge">STRUTS_2_5_22</code>. Based on the tag, Jenkins will generate a proper JavaDocs and deploy them directly into the website. You can verify them by using this <a href="https://struts.staged.apache.org/maven/struts2-core/apidocs/index.html">link</a>.</p>