This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch feature/WW-5371-modern-upload in repository https://gitbox.apache.org/repos/asf/struts-site.git
commit 0e928cf9a3ceea5680a66a230bf6a11c70472158 Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Wed Jan 10 08:52:27 2024 +0100 WW-5371 Documents new Action File Upload Interceptor --- ...ceptor.md => action-file-upload-interceptor.md} | 71 ++++----- source/core-developers/file-upload-interceptor.md | 4 +- source/core-developers/file-upload.md | 51 ++++++- source/core-developers/interceptors.md | 163 ++++++++++++--------- source/download.html | 2 +- 5 files changed, 167 insertions(+), 124 deletions(-) diff --git a/source/core-developers/file-upload-interceptor.md b/source/core-developers/action-file-upload-interceptor.md similarity index 68% copy from source/core-developers/file-upload-interceptor.md copy to source/core-developers/action-file-upload-interceptor.md index 0825bbbea..9feeb4ccb 100644 --- a/source/core-developers/file-upload-interceptor.md +++ b/source/core-developers/action-file-upload-interceptor.md @@ -1,24 +1,20 @@ --- layout: default -title: File Upload Interceptor +title: Action File Upload Interceptor parent: title: Interceptors - url: interceptors.html + url: interceptors --- -# File Upload Interceptor +# Action File Upload Interceptor + +> Available since Struts 6.4.0 as replacement for [File Upload Interceptor](file-upload-interceptor) See [this page](file-upload) for more examples and advanced configuration. Interceptor that is based off of `MultiPartRequestWrapper`, which is automatically applied for any request that includes -a file. It adds the following parameters, where `<file name>` is the name given to the file uploaded by the HTML form: - - - `<file name>`: `File` - the actual File - - `<file name>ContentType`: `String` - the content type of the file - - `<file name>FileName`: `String` - the actual name of the file uploaded (not the HTML name) - -You can get access to these files by merely providing setters in your action that correspond to any of the three patterns -above, such as `setDocument(File document)`, `setDocumentContentType(String contentType)`, etc. +a file. If an action implements `org.apache.struts2.action.UploadedFilesAware` interface, the interceptor will pass +information and content of uploaded files using the callback method `withUploadedFiles(List<UploadedFile>)`. See the example code section. @@ -54,7 +50,7 @@ and which are not. ```xml <action name="doUpload" class="com.example.UploadAction"> - <interceptor-ref name="fileUpload"/> + <interceptor-ref name="actionFileUpload"/> <interceptor-ref name="basicStack"/> <result name="success">good_result.jsp</result> </action> @@ -78,34 +74,27 @@ You must set the encoding to <code>multipart/form-data</code> in the form where **Example Action class:** ```java - package com.example; - - import java.io.File; - import com.opensymphony.xwork2.ActionSupport; - - public UploadAction extends ActionSupport { - private File file; - private String contentType; - private String filename; - - public void setUpload(File file) { - this.file = file; - } - - public void setUploadContentType(String contentType) { - this.contentType = contentType; - } - - public void setUploadFileName(String filename) { - this.filename = filename; - } - - public String execute() { - //... - return SUCCESS; - } - } - +public class UploadAction extends ActionSupport implements UploadedFilesAware { + private UploadedFile uploadedFile; + private String contentType; + private String fileName; + private String originalName; + + @Override + public void withUploadedFiles(List<UploadedFile> uploadedFiles) { + if (!uploadedFiles.isEmpty() > 0) { + this.uploadedFile = uploadedFiles.get(0); + this.fileName = uploadedFile.getName(); + this.contentType = uploadedFile.getContentType(); + this.originalName = uploadedFile.getOriginalName(); + } + } + + public String execute() { + //do something with the file + return SUCCESS; + } +} ``` **Setting parameters example:** @@ -118,5 +107,5 @@ You must set the encoding to <code>multipart/form-data</code> in the form where </interceptor-ref> ``` -This part is optional and would be done in place of the `<interceptor-ref name="fileUpload"/>` line in the action mapping +This part is optional and would be done in place of the `<interceptor-ref name="actionFileUpload"/>` line in the action mapping example above. diff --git a/source/core-developers/file-upload-interceptor.md b/source/core-developers/file-upload-interceptor.md index 0825bbbea..5dd64b68b 100644 --- a/source/core-developers/file-upload-interceptor.md +++ b/source/core-developers/file-upload-interceptor.md @@ -3,11 +3,13 @@ layout: default title: File Upload Interceptor parent: title: Interceptors - url: interceptors.html + url: interceptors --- # File Upload Interceptor +> Since Struts 6.4.0 this interceptor is deprecated, please use Action FileUpload Interceptor instead! + See [this page](file-upload) for more examples and advanced configuration. Interceptor that is based off of `MultiPartRequestWrapper`, which is automatically applied for any request that includes diff --git a/source/core-developers/file-upload.md b/source/core-developers/file-upload.md index 9b53b6c67..60001313f 100644 --- a/source/core-developers/file-upload.md +++ b/source/core-developers/file-upload.md @@ -1,6 +1,9 @@ --- layout: core-developers title: File Upload +parent: + title: Core Developers Guide + url: index --- # File Upload @@ -21,11 +24,13 @@ than the temporary directory and the directories that belong to your web applica The Struts 2 framework leverages the Commons FileUpload library as a based library to support file upload in the framework. The library is included in a base Struts 2 distribution. +> NOTE: Since Struts 6.4.0 the `FileUploadInterceptor` is deprecated and you should use `ActionFileUploadInterceptor` instead! + ## Basic Usage -The `org.apache.struts2.interceptor.FileUploadInterceptor` class is included as part of the `defaultStack`. As long as -the required libraries are added to your project you will be able to take advantage of the Struts 2 file upload -capability. Configure an Action mapping for your Action class as you typically would. +The `org.apache.struts2.interceptor.FileUploadInterceptor` and `org.apache.struts2.interceptor.ActionFileUploadInterceptor` +classes is included as part of the `defaultStack`. As long as the required libraries are added to your project you will be able +to take advantage of the Struts 2 file upload capability. Configure an Action mapping for your Action class as you typically would. ### Example action mapping: @@ -36,9 +41,8 @@ capability. Configure an Action mapping for your Action class as you typically w ``` -A form must be create with a form field of type file, `<INPUT type="file" name="upload">`. The form used to upload the -file must have its encoding type set -to `multipart/form-data`, `<form action="doUpload" enctype="multipart/form-data" method="post">`. +A form must be created with a form field of type file, `<INPUT type="file" name="upload">`. The form used to upload the +file must have its encoding type set to `multipart/form-data`, `<form action="doUpload" enctype="multipart/form-data" method="post">`. The standard procedure for adding these elements is by using the Struts 2 tag libraries as shown in the following example: @@ -51,7 +55,35 @@ example: </s:form> ``` -The fileUpload interceptor will use setter injection to insert the uploaded file and related data into your Action +The actionFileUpload interceptor will use a dedicated interface `org.apache.struts2.action.UploadedFilesAware` to transfer +information and content of uploaded file. Your action should implement the interface to receive the uploaded file: + +```java +public class UploadAction extends ActionSupport implements UploadedFilesAware { + + private UploadedFile uploadedFile; + private String contentType; + private String fileName; + private String originalName; + + @Override + public void withUploadedFiles(List<UploadedFile> uploadedFiles) { + if (!uploadedFiles.isEmpty() > 0) { + this.uploadedFile = uploadedFiles.get(0); + this.fileName = uploadedFile.getName(); + this.contentType = uploadedFile.getContentType(); + this.originalName = uploadedFile.getOriginalName(); + } + } + + public String execute() { + // do something with the file + return SUCCESS; + } +} +``` + +**Deprecated approach**: the fileUpload interceptor will use setter injection to insert the uploaded file and related data into your Action class. For a form field named `upload` you would provide the three setter methods shown in the following example: ### Example Action class: @@ -119,7 +151,10 @@ see `struts-fileupload.xml` in the sample application download. </s:form> ``` -`MultipleFileUploadUsingArrayAction.java` +The `org.apache.struts2.action.UploadedFilesAware` interface already supports uploading multiple files, you do not need to +follow the below example. + +**Deprecated approach**: `MultipleFileUploadUsingArrayAction.java` ```java public class MultipleFileUploadUsingArrayAction extends ActionSupport { diff --git a/source/core-developers/interceptors.md b/source/core-developers/interceptors.md index bb5881178..e11f6cb2f 100644 --- a/source/core-developers/interceptors.md +++ b/source/core-developers/interceptors.md @@ -1,45 +1,48 @@ --- -layout: core-developers +layout: default title: Interceptors +parent: + title: Core Developers Guide + url: index --- # Interceptors {:.no_toc} * Will be replaced with the ToC, excluding a header -{:toc} + {:toc} -The default Interceptor stack is designed to serve the needs of most applications. Most applications will **not** need +The default Interceptor stack is designed to serve the needs of most applications. Most applications will **not** need to add Interceptors or change the Interceptor stack. -Many Actions share common concerns. Some Actions need input validated. Other Actions may need a file upload -to be pre-processed. Another Action might need protection from a double submit. Many Actions need drop-down lists +Many Actions share common concerns. Some Actions need input validated. Other Actions may need a file upload +to be pre-processed. Another Action might need protection from a double submit. Many Actions need drop-down lists and other controls pre-populated before the page displays. -The framework makes it easy to share solutions to these concerns using an "Interceptor" strategy. When you request -a resource that maps to an "action", the framework invokes the Action object. But, before the Action is executed, -the invocation can be intercepted by another object. After the Action executes, the invocation could be intercepted +The framework makes it easy to share solutions to these concerns using an "Interceptor" strategy. When you request +a resource that maps to an "action", the framework invokes the Action object. But, before the Action is executed, +the invocation can be intercepted by another object. After the Action executes, the invocation could be intercepted again. Unsurprisingly, we call these objects "Interceptors." ## Understanding Interceptors -Interceptors can execute code before and after an Action is invoked. Most of the framework's core functionality is -implemented as Interceptors. Features like double-submit guards, type conversion, object population, validation, -file upload, page preparation, and more, are all implemented with the help of Interceptors. Each and every Interceptor +Interceptors can execute code before and after an Action is invoked. Most of the framework's core functionality is +implemented as Interceptors. Features like double-submit guards, type conversion, object population, validation, +file upload, page preparation, and more, are all implemented with the help of Interceptors. Each and every Interceptor is pluggable, so you can decide exactly which features an Action needs to support. -Interceptors can be configured on a per-action basis. Your own custom Interceptors can be mixed-and-matched with -the Interceptors bundled with the framework. Interceptors "set the stage" for the Action classes, doing much of +Interceptors can be configured on a per-action basis. Your own custom Interceptors can be mixed-and-matched with +the Interceptors bundled with the framework. Interceptors "set the stage" for the Action classes, doing much of the "heavy lifting" before the Action executes. **Action Lifecycle**  -In some cases, an Interceptor might keep an Action from firing, because of a double-submit or because validation failed. +In some cases, an Interceptor might keep an Action from firing, because of a double-submit or because validation failed. Interceptors can also change the state of an Action before it executes. -The Interceptors are defined in a stack that specifies the execution order. In some cases, the order of the Interceptors +The Interceptors are defined in a stack that specifies the execution order. In some cases, the order of the Interceptors on the stack can be very important. ## Configuring Interceptors @@ -47,44 +50,46 @@ on the stack can be very important. **struts.xml** ```xml + <package name="default" extends="struts-default"> - <interceptors> - <interceptor name="timer" class=".."/> - <interceptor name="logger" class=".."/> - </interceptors> - - <action name="login" class="tutorial.Login"> - <interceptor-ref name="timer"/> - <interceptor-ref name="logger"/> - <result name="input">login.jsp</result> - <result name="success" type="redirectAction">/secure/home</result> - </action> + <interceptors> + <interceptor name="timer" class=".."/> + <interceptor name="logger" class=".."/> + </interceptors> + + <action name="login" class="tutorial.Login"> + <interceptor-ref name="timer"/> + <interceptor-ref name="logger"/> + <result name="input">login.jsp</result> + <result name="success" type="redirectAction">/secure/home</result> + </action> </package> ``` ## Stacking Interceptors -With most web applications, we find ourselves wanting to apply the same set of Interceptors over and over again. Rather +With most web applications, we find ourselves wanting to apply the same set of Interceptors over and over again. Rather than reiterate the same list of Interceptors, we can bundle these Interceptors together using an Interceptor Stack. **struts.xml** ```xml + <package name="default" extends="struts-default"> - <interceptors> + <interceptors> <interceptor name="timer" class=".."/> <interceptor name="logger" class=".."/> <interceptor-stack name="myStack"> - <interceptor-ref name="timer"/> - <interceptor-ref name="logger"/> + <interceptor-ref name="timer"/> + <interceptor-ref name="logger"/> </interceptor-stack> </interceptors> - <action name="login" class="tutuorial.Login"> - <interceptor-ref name="myStack"/> - <result name="input">login.jsp</result> - <result name="success" type="redirectAction">/secure/home</result> - </action> + <action name="login" class="tutuorial.Login"> + <interceptor-ref name="myStack"/> + <result name="input">login.jsp</result> + <result name="success" type="redirectAction">/secure/home</result> + </action> </package> ``` @@ -96,18 +101,19 @@ Looking inside `struts-default.xml`, we can see how it's done. {% remote_file_content https://raw.githubusercontent.com/apache/struts/master/core/src/main/resources/struts-default.xml %} {% endhighlight %} -Since the `struts-default.xml` is included in the application's configuration by default, all the predefined +Since the `struts-default.xml` is included in the application's configuration by default, all the predefined interceptors and stacks are available "out of the box". ## Framework Interceptors -Interceptor classes are also defined using a key-value pair specified in the Struts configuration file. The names -specified below come specified in [struts-default.xml](struts-default-xml). If you extend the `struts-default` -package, then you can use the names below. Otherwise, they must be defined in your package with a name-class pair +Interceptor classes are also defined using a key-value pair specified in the Struts configuration file. The names +specified below come specified in [struts-default.xml](struts-default-xml). If you extend the `struts-default` +package, then you can use the names below. Otherwise, they must be defined in your package with a name-class pair specified in the `<interceptors/>` tag. | Interceptor | Name | Description | |------------------------------------------------------------------------------------|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Action File Upload Interceptor](action-file-upload-interceptor) | actionFileUpload | Available since Struts 6.4.0: an Interceptor that adds easy access to file upload support. | | [Alias Interceptor](alias-interceptor) | alias | Converts similar parameters that may be named differently between requests. | | [Annotation Parameter Filter Interceptor](annotation-parameter-filter-interceptor) | annotationParameterFilter | Annotation based version of [Parameter Filter Interceptor](parameter-filter-interceptor). | | [Annotation Workflow Interceptor](annotation-workflow-interceptor) | annotationWorkflow | Invokes any annotated methods on the action. | @@ -120,17 +126,17 @@ specified in the `<interceptors/>` tag. | [Cross-Origin Opener Policy Interceptor](coop-interceptor) | coop | Implements the Cross-Origin Opener Policy on incoming requests used to isolate resources against side-channel attacks and information leaks. | | [Create Session Interceptor](create-session-interceptor) | createSession | Create an HttpSession automatically, useful with certain Interceptors that require a HttpSession to work properly (like the TokenInterceptor) | | [Clear Session Interceptor](clear-session-interceptor) | clearSession | This interceptor clears the HttpSession. | -| [Content Security Policy Interceptor](csp-interceptor) | csp | Adds support for Content Security policy. | +| [Content Security Policy Interceptor](csp-interceptor) | csp | Adds support for Content Security policy. | | [Debugging Interceptor](debugging-interceptor) | debugging | Provides several different debugging screens to provide insight into the data behind the page. | | [Default Workflow Interceptor](default-workflow-interceptor) | workflow | Calls the validate method in your Action class. If Action errors are created then it returns the INPUT view. | | [Exception Interceptor](exception-interceptor) | exception | Maps exceptions to a result. | | [Execute and Wait Interceptor](execute-and-wait-interceptor) | execAndWait | Executes the Action in the background and then sends the user off to an intermediate waiting page. | | [Fetch Metadata Interceptor](fetch-metadata-interceptor) | fetchMetadata | Implements the Resource Isolation Policies on incoming requests used to protect against CSRF, XSSI, and cross-origin information leaks. | -| [File Upload Interceptor](file-upload-interceptor) | fileUpload | An Interceptor that adds easy access to file upload support. | +| [File Upload Interceptor](file-upload-interceptor) | fileUpload | **DEPERECTED** since Struts 6.4.0: an Interceptor that adds easy access to file upload support. | | [I18n Interceptor](i18n-interceptor) | i18n | Remembers the locale selected for a user's session. | | [Logging Interceptor](logging-interceptor) | logger | Outputs the name of the Action. | | [Message Store Interceptor](message-store-interceptor) | store | Store and retrieve action messages / errors / field errors for action that implements ValidationAware interface into session. | -| [Model Driven Interceptor](model-driven-interceptor) | modelDriven | If the Action implements ModelDriven, pushes the getModel Result onto the Value Stack. | +| [Model Driven Interceptor](model-driven-interceptor) | modelDriven | If the Action implements ModelDriven, pushes the getModel Result onto the Value Stack. | | [Multiselect Interceptor](multiselect-interceptor) | multiselect | Like the checkbox interceptor detects that no value was selected for a field with multiple values (like a select) and adds an empty parameter | | [NoOp Interceptor](no-op-interceptor) | noop | Does nothing, just passes invocation further, used in empty stack | | [Parameter Filter Interceptor](parameter-filter-interceptor) | parameterFilter | Removes parameters from the list of those available to Actions | @@ -147,23 +153,25 @@ specified in the `<interceptors/>` tag. | [Token Session Interceptor](token-session-interceptor) | tokenSession | Same as Token Interceptor, but stores the submitted data in session when handed an invalid token | | [Validation Interceptor](validation-interceptor) | validation | Performs validation using the validators defined in _action_ -validation.xml | -Since 2.0.7, Interceptors and Results with hyphenated names were converted to camelCase. (The former model-driven is -now modelDriven.) The original hyphenated names are retained as "aliases" until Struts 2.1.0. For clarity, +Since 2.0.7, Interceptors and Results with hyphenated names were converted to camelCase. (The former model-driven is +now modelDriven.) The original hyphenated names are retained as "aliases" until Struts 2.1.0. For clarity, the hyphenated versions are not listed here, but might be referenced in prior versions of the documentation. ## Method Filtering -`MethodFilterInterceptor` is an abstract `Interceptor` used as a base class for interceptors that will filter execution +`MethodFilterInterceptor` is an abstract `Interceptor` used as a base class for interceptors that will filter execution based on method names according to specified included/excluded method lists. Settable parameters are as follows: + - excludeMethods - method names to be excluded from interceptor processing - includeMethods - method names to be included in interceptor processing -> If method name are available in both includeMethods and excludeMethods, it will be considered as an included method: +> If method name are available in both includeMethods and excludeMethods, it will be considered as an included method: > includeMethods takes precedence over excludeMethods. Interceptors that extends this capability include: + - `TokenInterceptor` - `TokenSessionStoreInterceptor` - `DefaultWorkflowInterceptor` @@ -176,6 +184,7 @@ Interceptor's parameter could be overridden through the following ways : **Method 1**: ```xml + <action name="myAction" class="myActionClass"> <interceptor-ref name="exception"/> <interceptor-ref name="alias"/> @@ -201,6 +210,7 @@ Interceptor's parameter could be overridden through the following ways : **Method 2**: ```xml + <action name="myAction" class="myActionClass"> <interceptor-ref name="defaultStack"> <param name="validation.excludeMethods">myValidationExcludeMethod</param> @@ -211,21 +221,22 @@ Interceptor's parameter could be overridden through the following ways : In the first method, the whole default stack is copied and the parameter then changed accordingly. -In the second method, the `interceptor-ref` refers to an existing interceptor-stack, namely `defaultStack` in this +In the second method, the `interceptor-ref` refers to an existing interceptor-stack, namely `defaultStack` in this example, and override the `validator` and `workflow` interceptor `excludeMethods` attribute. Note that in the `param` -tag, the name attribute contains a dot (.) the word before the dot(.) specifies the interceptor name whose parameter is +tag, the name attribute contains a dot (.) the word before the dot(.) specifies the interceptor name whose parameter is to be overridden and the word after the dot (.) specifies the parameter itself. The syntax is as follows: ``` <interceptor-name>.<parameter-name> ``` -Note also that in this case the `interceptor-ref` name attribute is used to indicate an interceptor stack which makes +Note also that in this case the `interceptor-ref` name attribute is used to indicate an interceptor stack which makes sense as if it is referring to the interceptor itself it would be just using Method 1 describe above. **Method 3**: ```xml + <interceptors> <interceptor-stack name="parentStack"> <interceptor-ref name="defaultStack"> @@ -239,49 +250,52 @@ sense as if it is referring to the interceptor itself it would be just using Met ## Interceptor Parameter Overriding Inheritance -Parameters override are not inherited in interceptors, meaning that the last set of overridden parameters will be used. +Parameters override are not inherited in interceptors, meaning that the last set of overridden parameters will be used. For example, if a stack overrides the parameter "defaultBlock" for the "postPrepareParameterFilter" interceptor as: ```xml + <interceptor-stack name="parentStack"> - <interceptor-ref name="postPrepareParameterFilter"> - <param name="defaultBlock">true</param> - </interceptor-ref> + <interceptor-ref name="postPrepareParameterFilter"> + <param name="defaultBlock">true</param> + </interceptor-ref> </interceptor-stack> ``` and an action overrides the "allowed" for "postPrepareParameterFilter": ```xml + <package name="child2" namespace="/child" extends="parentPackage"> - <action name="list" class="SomeAction"> - <interceptor-ref name="parentStack"> - <param name="postPrepareParameterFilter.allowed">myObject.name</param> - </interceptor-ref> - </action> + <action name="list" class="SomeAction"> + <interceptor-ref name="parentStack"> + <param name="postPrepareParameterFilter.allowed">myObject.name</param> + </interceptor-ref> + </action> </package> ``` -Then, only "allowed" will be overridden for the "postPrepareParameterFilter" interceptor in that action, +Then, only "allowed" will be overridden for the "postPrepareParameterFilter" interceptor in that action, the other params will be null. ## Lazy parameters This functionality was added in Struts 2.5.9 -It is possible to define an interceptor with parameters evaluated during action invocation. In such case -the interceptor must be marked with `WithLazyParams` interface. This must be developer's decision as interceptor -must be aware of having those parameters set during invocation and not when the interceptor is created as it happens +It is possible to define an interceptor with parameters evaluated during action invocation. In such case +the interceptor must be marked with `WithLazyParams` interface. This must be developer's decision as interceptor +must be aware of having those parameters set during invocation and not when the interceptor is created as it happens in normal way. Params are evaluated as any other expression starting with from action as a top object. ```xml + <action name="LazyFoo" class="com.opensymphony.xwork2.SimpleAction"> - <result name="success">result.jsp</result> - <interceptor-ref name="lazy"> - <param name="foo">${bar}</param> - </interceptor-ref> + <result name="success">result.jsp</result> + <interceptor-ref name="lazy"> + <param name="foo">${bar}</param> + </interceptor-ref> </action> ``` @@ -301,7 +315,7 @@ public class MockLazyInterceptor extends AbstractInterceptor implements WithLazy } ``` -Please be aware that order of interceptors can matter when want to access parameters passed via request as those +Please be aware that order of interceptors can matter when want to access parameters passed via request as those parameters are set by [Parameters Interceptor](parameters-interceptor). ## Disabling interceptor @@ -313,6 +327,7 @@ overriding logic to set the `disabled` parameter to `true` to skip processing of An example how to disable the Validation interceptor: ```xml + <action name="myAction" class="myActionClass"> <interceptor-ref name="defaultStack"> <param name="validation.disabled">true</param> @@ -322,20 +337,22 @@ An example how to disable the Validation interceptor: ## Order of Interceptor Execution -Interceptors provide an excellent means to wrap before/after processing. The concept reduces code duplication (think AOP). +Interceptors provide an excellent means to wrap before/after processing. The concept reduces code duplication (think +AOP). ```xml + <interceptor-stack name="xaStack"> - <interceptor-ref name="thisWillRunFirstInterceptor"/> - <interceptor-ref name="thisWillRunNextInterceptor"/> - <interceptor-ref name="followedByThisInterceptor"/> - <interceptor-ref name="thisWillRunLastInterceptor"/> + <interceptor-ref name="thisWillRunFirstInterceptor"/> + <interceptor-ref name="thisWillRunNextInterceptor"/> + <interceptor-ref name="followedByThisInterceptor"/> + <interceptor-ref name="thisWillRunLastInterceptor"/> </interceptor-stack> ``` > Note that some Interceptors will interrupt the stack/chain/flow ... so the > order is very important. -Interceptors implementing `com.opensymphony.xwork2.interceptor.PreResultListener` will run after the Action executes +Interceptors implementing `com.opensymphony.xwork2.interceptor.PreResultListener` will run after the Action executes but before the Result executes. ``` diff --git a/source/download.html b/source/download.html index e4e8d66bc..7e7e0e5d8 100644 --- a/source/download.html +++ b/source/download.html @@ -64,7 +64,7 @@ title: Download a Release The <a href="https://struts.apache.org/">Apache Struts {{ site.current_version }}</a> is an elegant, extensible framework for creating enterprise-ready Java web applications. It is available in a full distribution, or as separate library, source, example and documentation distributions. - Struts {{ site.current_version }} is the "best available" version of Struts in the 2.5 series. + Struts {{ site.current_version }} is the "best available" version of Struts in the 6.x series. </p> <ul>