(struts-site) branch asf-staging updated: Updates stage by Jenkins

2024-01-09 Thread git-site-role
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 820a53c18 Updates stage by Jenkins
820a53c18 is described below

commit 820a53c18ef125364faf11162ab8f995728757c6
Author: jenkins 
AuthorDate: Wed Jan 10 07:58:30 2024 +

Updates stage by Jenkins
---
 ...or.html => action-file-upload-interceptor.html} |  77 
 .../core-developers/file-upload-interceptor.html   |   6 +-
 content/core-developers/file-upload.html   |  49 +-
 content/core-developers/interceptors.html  | 194 +++--
 content/download.html  |   2 +-
 5 files changed, 182 insertions(+), 146 deletions(-)

diff --git a/content/core-developers/file-upload-interceptor.html 
b/content/core-developers/action-file-upload-interceptor.html
similarity index 77%
copy from content/core-developers/file-upload-interceptor.html
copy to content/core-developers/action-file-upload-interceptor.html
index 800fd990d..1c99c5b98 100644
--- a/content/core-developers/file-upload-interceptor.html
+++ b/content/core-developers/action-file-upload-interceptor.html
@@ -7,7 +7,7 @@
   
   
 
-  File Upload Interceptor
+  Action File Upload Interceptor
 
   
   
@@ -146,25 +146,21 @@
 
 
   
-https://github.com/apache/struts-site/edit/master/source/core-developers/file-upload-interceptor.md;
 title="Edit this page on GitHub">Edit on GitHub
+https://github.com/apache/struts-site/edit/master/source/core-developers/action-file-upload-interceptor.md;
 title="Edit this page on GitHub">Edit on GitHub
 
-<< back to 
Interceptors
+<< back to 
Interceptors
 
-File Upload Interceptor
+Action File Upload Interceptor
+
+
+  Available since Struts 6.4.0 as replacement for File Upload Interceptor
+
 
 See this page 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 
nameContentType: String - the content type of the file
-  file 
nameFileName: 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(ListUploadedFile).
 
 See the example code section.
 
@@ -203,7 +199,7 @@ and which are not.
 Example action mapping:
 
  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
@@ -225,34 +221,27 @@ and which are not.
 
 Example Action class:
 
-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(ListUploadedFile 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:
@@ -264,7 +253,7 @@ and which are not.
 /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 

(struts-site) branch feature/WW-5371-modern-upload created (now 0e928cf9a)

2024-01-09 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch feature/WW-5371-modern-upload
in repository https://gitbox.apache.org/repos/asf/struts-site.git


  at 0e928cf9a WW-5371 Documents new Action File Upload Interceptor

This branch includes the following new commits:

 new 0e928cf9a WW-5371 Documents new Action File Upload Interceptor

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(struts-site) 01/01: WW-5371 Documents new Action File Upload Interceptor

2024-01-09 Thread lukaszlenart
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 
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 `` is the name 
given to the file uploaded by the HTML form:
-
- - ``: `File` - the actual File
- - `ContentType`: `String` - the content type of the file
- - `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)`.
 
 See the example code section.
 
@@ -54,7 +50,7 @@ and which are not.
 
 ```xml
  
- 
+ 
  
  good_result.jsp
  
@@ -78,34 +74,27 @@ You must set the encoding to 
multipart/form-data 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 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 
multipart/form-data in the form where
 
 ```
 
-This part is optional and would be done in place of the `` line in the action mapping 
+This part is optional and would be done in place of the `` 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 

(struts) branch master updated (f5a7c31f2 -> d8dc720d4)

2024-01-09 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git


from f5a7c31f2 Merge pull request #838 from apache/fix/debug-level
 add 55ca7a5b3 WW-5365 Reverts changes introduced in WW-5192 to allow 
evaluate the value attribute
 new d8dc720d4 Merge pull request #835 from apache/fix/WW-5365-radio-value

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/struts2/components/Radio.java  |  8 -
 .../test/java/org/apache/struts2/TestAction.java   |  9 ++
 .../org/apache/struts2/views/jsp/ui/RadioTest.java | 37 --
 .../org/apache/struts2/views/jsp/ui/Radio-11.txt   |  4 +++
 4 files changed, 48 insertions(+), 10 deletions(-)
 create mode 100644 
core/src/test/resources/org/apache/struts2/views/jsp/ui/Radio-11.txt



(struts) 01/01: Merge pull request #835 from apache/fix/WW-5365-radio-value

2024-01-09 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git

commit d8dc720d4bb484f61c5af271df30a252162f6412
Merge: f5a7c31f2 55ca7a5b3
Author: Lukasz Lenart 
AuthorDate: Tue Jan 9 18:59:51 2024 +0100

Merge pull request #835 from apache/fix/WW-5365-radio-value

[WW-5365] Reverts changes introduced in WW-5192 to allow evaluate the value 
attribute of Radio tag

 .../java/org/apache/struts2/components/Radio.java  |  8 -
 .../test/java/org/apache/struts2/TestAction.java   |  9 ++
 .../org/apache/struts2/views/jsp/ui/RadioTest.java | 37 --
 .../org/apache/struts2/views/jsp/ui/Radio-11.txt   |  4 +++
 4 files changed, 48 insertions(+), 10 deletions(-)



(struts) branch fix/WW-5365-radio-value deleted (was 55ca7a5b3)

2024-01-09 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch fix/WW-5365-radio-value
in repository https://gitbox.apache.org/repos/asf/struts.git


 was 55ca7a5b3 WW-5365 Reverts changes introduced in WW-5192 to allow 
evaluate the value attribute

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(struts-site) branch asf-staging updated: Updates stage by Jenkins

2024-01-09 Thread git-site-role
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 b7aff854c Updates stage by Jenkins
b7aff854c is described below

commit b7aff854cd581f42145c8bc918bc9c5283d13429
Author: jenkins 
AuthorDate: Tue Jan 9 12:17:14 2024 +

Updates stage by Jenkins



(struts-site) branch WW-5378-WW-5381-context-ext deleted (was 82ca10359)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5378-WW-5381-context-ext
in repository https://gitbox.apache.org/repos/asf/struts-site.git


 was 82ca10359 WW-5381 Document new accessor extension points

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(struts-site) branch master updated (52da98cd5 -> 94cb2fc55)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/struts-site.git


from 52da98cd5 Merge pull request #221 from briansu2004/patch-3
 add 9d57a5a9c WW-5378 Document OGNL context disabling options
 add 82ca10359 WW-5381 Document new accessor extension points
 new 94cb2fc55 Merge pull request #222 from 
apache/WW-5378-WW-5381-context-ext

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 source/plugins/plugins-architecture.md |  2 ++
 source/security/index.md   | 41 --
 2 files changed, 41 insertions(+), 2 deletions(-)



(struts-site) 01/01: Merge pull request #222 from apache/WW-5378-WW-5381-context-ext

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts-site.git

commit 94cb2fc55f32d5d5655c7849413e1ad3e6e67d31
Merge: 52da98cd5 82ca10359
Author: Kusal Kithul-Godage 
AuthorDate: Tue Jan 9 23:15:29 2024 +1100

Merge pull request #222 from apache/WW-5378-WW-5381-context-ext

WW-5378 WW-5381 Document OGNL context restrictions and new extension points

 source/plugins/plugins-architecture.md |  2 ++
 source/security/index.md   | 41 --
 2 files changed, 41 insertions(+), 2 deletions(-)



(struts) branch WW-5352-parameter-annotation-3 updated (637284ffb -> 56d8361b4)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


 discard 637284ffb WW-5352 Implement transition mode
 add 56d8361b4 WW-5352 Implement transition mode

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (637284ffb)
\
 N -- N -- N   refs/heads/WW-5352-parameter-annotation-3 (56d8361b4)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 core/src/main/java/org/apache/struts2/StrutsConstants.java | 1 -
 1 file changed, 1 deletion(-)



(struts) branch WW-5352-parameter-annotation-3 updated (bf7737fa0 -> 637284ffb)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


from bf7737fa0 WW-5352 Add unit test coverage for generics
 add 637284ffb WW-5352 Implement transition mode

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/struts2/StrutsConstants.java|  2 ++
 .../parameter/ParametersInterceptor.java| 21 -
 .../parameter/StrutsParameterAnnotationTest.java| 12 
 3 files changed, 34 insertions(+), 1 deletion(-)



(struts) branch WW-5352-parameter-annotation-3 updated (f106b2098 -> bf7737fa0)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


from f106b2098 WW-5352 Map-like type support
 add bf7737fa0 WW-5352 Add unit test coverage for generics

No new revisions were added by this update.

Summary of changes:
 .../parameter/StrutsParameterAnnotationTest.java   | 60 ++
 1 file changed, 60 insertions(+)



(struts) branch WW-5352-parameter-annotation-3 updated (6df80041e -> f106b2098)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


from 6df80041e WW-5352 Auto allowlist parameterized types!
 add f106b2098 WW-5352 Map-like type support

No new revisions were added by this update.

Summary of changes:
 .../struts2/interceptor/parameter/ParametersInterceptor.java   | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)



(struts) branch WW-5352-parameter-annotation-3 updated (770d31110 -> 6df80041e)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


from 770d31110 WW-5352 Mild optimisation
 add 6df80041e WW-5352 Auto allowlist parameterized types!

No new revisions were added by this update.

Summary of changes:
 apps/showcase/src/main/resources/struts.xml|  5 --
 .../parameter/ParametersInterceptor.java   | 75 +++---
 2 files changed, 39 insertions(+), 41 deletions(-)



(struts) branch WW-5352-parameter-annotation-3 updated (937bc771f -> 770d31110)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


omit 937bc771f WW-5352 Implement auto-allowlisting for Iterator component
 add 0a71e2c3b WW-5352 Implement auto-allowlisting for Iterator component
 add 770d31110 WW-5352 Mild optimisation

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (937bc771f)
\
 N -- N -- N   refs/heads/WW-5352-parameter-annotation-3 (770d31110)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 apps/showcase/src/main/resources/struts.xml| 1 -
 .../opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java   | 2 ++
 .../apache/struts2/interceptor/parameter/ParametersInterceptor.java| 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)



(struts) branch WW-5352-parameter-annotation-3 updated (58c034259 -> 937bc771f)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


 discard 58c034259 WW-5352 Implement auto-allowlisting for Iterator component
 add 937bc771f WW-5352 Implement auto-allowlisting for Iterator component

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (58c034259)
\
 N -- N -- N   refs/heads/WW-5352-parameter-annotation-3 (937bc771f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java   | 3 +--
 .../main/java/org/apache/struts2/views/jsp/StrutsBodyTagSupport.java   | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)



(struts) branch WW-5352-parameter-annotation-3 updated (18b343643 -> 58c034259)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


 discard 18b343643 WW-5352 Implement auto-allowlisting for Iterator component
 add 58c034259 WW-5352 Implement auto-allowlisting for Iterator component

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (18b343643)
\
 N -- N -- N   refs/heads/WW-5352-parameter-annotation-3 (58c034259)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../struts2/components/IteratorComponentTest.java| 20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)



(struts) branch WW-5352-parameter-annotation-3 updated (a57c2882e -> 18b343643)

2024-01-09 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-5352-parameter-annotation-3
in repository https://gitbox.apache.org/repos/asf/struts.git


from a57c2882e WW-5352 Reinstate manual allowlist for generic types
 add 18b343643 WW-5352 Implement auto-allowlisting for Iterator component

No new revisions were added by this update.

Summary of changes:
 .../apache/struts2/components/IteratorComponent.java  | 13 +++--
 .../apache/struts2/views/jsp/ComponentTagSupport.java | 19 ---
 .../struts2/views/jsp/StrutsBodyTagSupport.java   |  2 ++
 3 files changed, 21 insertions(+), 13 deletions(-)