(struts-site) branch fix/file-upload-navigation updated (812ca70f7 -> 471ce2b5e)

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

lukaszlenart pushed a change to branch fix/file-upload-navigation
in repository https://gitbox.apache.org/repos/asf/struts-site.git


from 812ca70f7 Splits file upload page
 new b537ecaa0 Drops useless highlighter
 new 471ce2b5e Adds dedicate examples with different styles

The 2 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:
 .gitignore|   3 +-
 Gemfile.lock  |  70 -
 _config.yml   |   4 +-
 docker-arm64-serve.sh |   3 +
 source/_layouts/default.html  |   2 +-
 source/core-developers/file-upload-interceptor.md |   3 +-
 source/core-developers/file-upload.md |   2 +-
 source/core-developers/interceptors.md|   2 +-
 source/css/main.css   |   2 -
 source/css/syntax.css | 273 +
 source/highlighter/github-theme.css   |  60 
 source/highlighter/js/shAutoloader.js |  17 --
 source/highlighter/js/shBrushAS3.js   |  59 
 source/highlighter/js/shBrushAppleScript.js   |  75 -
 source/highlighter/js/shBrushBash.js  |  59 
 source/highlighter/js/shBrushCSharp.js|  65 -
 source/highlighter/js/shBrushColdFusion.js| 100 ---
 source/highlighter/js/shBrushCpp.js   |  97 ---
 source/highlighter/js/shBrushCss.js   |  91 --
 source/highlighter/js/shBrushDelphi.js|  55 
 source/highlighter/js/shBrushDiff.js  |  41 ---
 source/highlighter/js/shBrushErlang.js|  52 
 source/highlighter/js/shBrushGroovy.js|  67 -
 source/highlighter/js/shBrushJScript.js   |  52 
 source/highlighter/js/shBrushJava.js  |  57 
 source/highlighter/js/shBrushJavaFX.js|  58 
 source/highlighter/js/shBrushPerl.js  |  72 -
 source/highlighter/js/shBrushPhp.js   |  88 --
 source/highlighter/js/shBrushPlain.js |  33 ---
 source/highlighter/js/shBrushPowerShell.js|  74 -
 source/highlighter/js/shBrushPython.js|  64 
 source/highlighter/js/shBrushRuby.js  |  55 
 source/highlighter/js/shBrushSass.js  |  94 --
 source/highlighter/js/shBrushScala.js |  51 
 source/highlighter/js/shBrushSql.js   |  66 -
 source/highlighter/js/shBrushVb.js|  56 
 source/highlighter/js/shBrushXml.js   |  69 -
 source/highlighter/js/shCore.js   |  17 --
 source/highlighter/js/shLegacy.js |  17 --
 source/highlighter/style/shCore.css   | 226 ---
 source/highlighter/style/shCoreDefault.css| 328 -
 source/highlighter/style/shCoreDjango.css | 331 -
 source/highlighter/style/shCoreEclipse.css| 339 --
 source/highlighter/style/shCoreEmacs.css  | 324 -
 source/highlighter/style/shCoreFadeToGrey.css | 328 -
 source/highlighter/style/shCoreMDUltra.css| 324 -
 source/highlighter/style/shCoreMidnight.css   | 324 -
 source/highlighter/style/shCoreRDark.css  | 324 -
 source/highlighter/style/shCoreStruts.css | 339 --
 source/highlighter/style/shThemeDefault.css   | 117 
 source/highlighter/style/shThemeDjango.css| 120 
 source/highlighter/style/shThemeEclipse.css   | 128 
 source/highlighter/style/shThemeEmacs.css | 113 
 source/highlighter/style/shThemeFadeToGrey.css| 117 
 source/highlighter/style/shThemeMDUltra.css   | 113 
 source/highlighter/style/shThemeMidnight.css  | 113 
 source/highlighter/style/shThemeRDark.css | 113 
 source/highlighter/style/shThemeStruts.css| 128 
 source/mail.md|   6 +-
 source/updating-website.md| 199 +
 60 files changed, 428 insertions(+), 6151 deletions(-)
 delete mode 100644 Gemfile.lock
 create mode 100644 docker-arm64-serve.sh
 delete mode 100644 source/highlighter/github-theme.css
 delete mode 100644 source/highlighter/js/shAutoloader.js
 delete mode 100644 source/highlighter/js/shBrushAS3.js
 delete mode 100644 source/highlighter/js/shBrushAppleScript.js
 delete mode 100644 source/highlighter/js/shBrushBash.js
 delete mode 100644 source/highli

(struts-site) 02/02: Adds dedicate examples with different styles

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

lukaszlenart pushed a commit to branch fix/file-upload-navigation
in repository https://gitbox.apache.org/repos/asf/struts-site.git

commit 471ce2b5e2ad10d3274b30dccc88ec67f673b5cb
Author: Lukasz Lenart 
AuthorDate: Sun Mar 17 10:18:02 2024 +0100

Adds dedicate examples with different styles
---
 .gitignore|   3 +-
 Gemfile.lock  |  70 --
 _config.yml   |   4 +-
 docker-arm64-serve.sh |   3 +
 source/_layouts/default.html  |   2 +-
 source/core-developers/file-upload-interceptor.md |   3 +-
 source/core-developers/file-upload.md |   2 +-
 source/core-developers/interceptors.md|   2 +-
 source/css/main.css   |   2 -
 source/css/syntax.css | 273 +-
 source/mail.md|   6 +-
 source/updating-website.md| 199 
 12 files changed, 428 insertions(+), 141 deletions(-)

diff --git a/.gitignore b/.gitignore
index 94afaf573..e5cc71cca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,8 @@ target
 .bundle
 .jekyll-metadata
 .jekyll-cache
-_site
+_site/
 .project
 .settings/
 .rvm/
+Gemfile.lock
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
deleted file mode 100644
index 471d19761..0
--- a/Gemfile.lock
+++ /dev/null
@@ -1,70 +0,0 @@
-GEM
-  remote: https://rubygems.org/
-  specs:
-addressable (2.8.1)
-  public_suffix (>= 2.0.2, < 6.0)
-colorator (1.1.0)
-concurrent-ruby (1.1.10)
-em-websocket (0.5.3)
-  eventmachine (>= 0.12.9)
-  http_parser.rb (~> 0)
-eventmachine (1.2.7)
-ffi (1.15.5)
-forwardable-extended (2.6.0)
-http_parser.rb (0.8.0)
-i18n (1.12.0)
-  concurrent-ruby (~> 1.0)
-jekyll (4.2.2)
-  addressable (~> 2.4)
-  colorator (~> 1.0)
-  em-websocket (~> 0.5)
-  i18n (~> 1.0)
-  jekyll-sass-converter (~> 2.0)
-  jekyll-watch (~> 2.0)
-  kramdown (~> 2.3)
-  kramdown-parser-gfm (~> 1.0)
-  liquid (~> 4.0)
-  mercenary (~> 0.4.0)
-  pathutil (~> 0.9)
-  rouge (~> 3.0)
-  safe_yaml (~> 1.0)
-  terminal-table (~> 2.0)
-jekyll-sass-converter (2.2.0)
-  sassc (> 2.0.1, < 3.0)
-jekyll-watch (2.2.1)
-  listen (~> 3.0)
-json (2.6.1)
-kramdown (2.4.0)
-  rexml
-kramdown-parser-gfm (1.1.0)
-  kramdown (~> 2.0)
-liquid (4.0.3)
-listen (3.7.1)
-  rb-fsevent (~> 0.10, >= 0.10.3)
-  rb-inotify (~> 0.9, >= 0.9.10)
-mercenary (0.4.0)
-pathutil (0.16.2)
-  forwardable-extended (~> 2.6)
-public_suffix (4.0.7)
-rb-fsevent (0.11.2)
-rb-inotify (0.10.1)
-  ffi (~> 1.0)
-rexml (3.2.5)
-rouge (3.30.0)
-safe_yaml (1.0.5)
-sassc (2.4.0)
-  ffi (~> 1.9)
-terminal-table (2.0.0)
-  unicode-display_width (~> 1.1, >= 1.1.1)
-unicode-display_width (1.8.0)
-
-PLATFORMS
-  x86_64-darwin-21
-  x86_64-linux
-
-DEPENDENCIES
-  jekyll
-  json
-
-BUNDLED WITH
-   2.3.23
diff --git a/_config.yml b/_config.yml
index a25f0d5be..0f31b71a7 100644
--- a/_config.yml
+++ b/_config.yml
@@ -5,8 +5,10 @@ source: source
 encoding:   UTF-8
 highlighter:rouge
 kramdown:
-  input:  GFM
+  input: GFM
   syntax_highlighter: rouge
+  auto_ids: true
+  toc_levels: 1..3
 
 # Simplifies introducing changes related to the latest release
 current_version: 6.3.0.2
diff --git a/docker-arm64-serve.sh b/docker-arm64-serve.sh
new file mode 100644
index 0..9cdf262ca
--- /dev/null
+++ b/docker-arm64-serve.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+docker run --rm -v "$PWD:/var/jekyll" -p 4000:4000 -it 
mrxder/jekyll-docker-arm64:latest jekyll serve --host=0.0.0.0 --incremental
diff --git a/source/_layouts/default.html b/source/_layouts/default.html
index f5cd55043..475bdfb3a 100644
--- a/source/_layouts/default.html
+++ b/source/_layouts/default.html
@@ -13,7 +13,7 @@
   
   
   
-  
+  
 
   
   
diff --git a/source/core-developers/file-upload-interceptor.md 
b/source/core-developers/file-upload-interceptor.md
index b5799c15f..cc0dd8a99 100644
--- a/source/core-developers/file-upload-interceptor.md
+++ b/source/core-developers/file-upload-interceptor.md
@@ -8,7 +8,8 @@ parent:
 
 # File Upload Interceptor
 
-> Since Struts 6.4.0 this interceptor is deprecated, please use [Action File 
Upload Interceptor](action-file-upload-interceptor) instead!
+Since Struts 6.4.0 this interceptor is deprecated, please use [Action File 
Upload Interceptor](action-file-upload-interceptor) instead!
+{:.alert .alert-warning}
 
 See [this page](file-upload) for more examples and advanced configuration.
 
diff --git a/source/core-developers/file-upload.md 
b/source/core-developers/file-upload.md
index 0f61e2aa5..aa2223

(struts-site) branch fix/file-upload-navigation updated: Improves style

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

lukaszlenart pushed a commit to branch fix/file-upload-navigation
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/fix/file-upload-navigation by 
this push:
 new 5cc6d2313 Improves style
5cc6d2313 is described below

commit 5cc6d2313aacf0a089401ed2e21d3b0c7244739e
Author: Lukasz Lenart 
AuthorDate: Sun Mar 17 10:31:46 2024 +0100

Improves style
---
 .../action-file-upload-interceptor.md  |  7 +-
 source/core-developers/file-upload-interceptor.md  |  4 ++
 source/core-developers/interceptors.md | 80 +++---
 3 files changed, 50 insertions(+), 41 deletions(-)

diff --git a/source/core-developers/action-file-upload-interceptor.md 
b/source/core-developers/action-file-upload-interceptor.md
index 1c8902407..0096c07ae 100644
--- a/source/core-developers/action-file-upload-interceptor.md
+++ b/source/core-developers/action-file-upload-interceptor.md
@@ -7,8 +7,13 @@ parent:
 ---
 
 # Action File Upload Interceptor
+{:.no_toc}
 
-> Available since Struts 6.4.0 as replacement for [File Upload 
Interceptor](file-upload-interceptor)
+* Will be replaced with the ToC, excluding a header
+{:toc}
+
+Available since Struts 6.4.0 as replacement for [File Upload 
Interceptor](file-upload-interceptor)
+{:.alert .alert-info}
 
 See [this page](action-file-upload) for more examples and advanced 
configuration.
 
diff --git a/source/core-developers/file-upload-interceptor.md 
b/source/core-developers/file-upload-interceptor.md
index cc0dd8a99..da96ae136 100644
--- a/source/core-developers/file-upload-interceptor.md
+++ b/source/core-developers/file-upload-interceptor.md
@@ -7,6 +7,10 @@ parent:
 ---
 
 # File Upload Interceptor
+{:.no_toc}
+
+* Will be replaced with the ToC, excluding a header
+{:toc}
 
 Since Struts 6.4.0 this interceptor is deprecated, please use [Action File 
Upload Interceptor](action-file-upload-interceptor) instead!
 {:.alert .alert-warning}
diff --git a/source/core-developers/interceptors.md 
b/source/core-developers/interceptors.md
index a1d0b5204..4145c99f3 100644
--- a/source/core-developers/interceptors.md
+++ b/source/core-developers/interceptors.md
@@ -111,47 +111,47 @@ specified below come specified in 
[struts-default.xml](struts-default-xml). If y
 package, then you can use the names below. Otherwise, they must be defined in 
your package with a name-class pair
 specified in the `` 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. 


  |
-| [Chaining Inter

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

2024-03-17 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 1c11c63e0 Updates stage by Jenkins
1c11c63e0 is described below

commit 1c11c63e05474c4ba0042fede4c0bdea530704ca
Author: jenkins 
AuthorDate: Sun Mar 17 09:33:53 2024 +

Updates stage by Jenkins
---
 content/core-developers/action-file-upload-interceptor.html | 12 
 content/core-developers/file-upload-interceptor.html|  8 +++-
 content/core-developers/interceptors.html   |  2 +-
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/content/core-developers/action-file-upload-interceptor.html 
b/content/core-developers/action-file-upload-interceptor.html
index cac2831bc..b1f048d09 100644
--- a/content/core-developers/action-file-upload-interceptor.html
+++ b/content/core-developers/action-file-upload-interceptor.html
@@ -150,11 +150,15 @@
 
 << back to 
Interceptors
 
-Action File Upload Interceptor
+Action File Upload 
Interceptor
 
-
-  Available since Struts 6.4.0 as replacement for File Upload Interceptor
-
+
+  Parameters
+  Extending the Interceptor
+  Examples
+
+
+Available since Struts 6.4.0 as replacement for File Upload Interceptor
 
 See this page for more examples and 
advanced configuration.
 
diff --git a/content/core-developers/file-upload-interceptor.html 
b/content/core-developers/file-upload-interceptor.html
index a9ef1e554..5986154e4 100644
--- a/content/core-developers/file-upload-interceptor.html
+++ b/content/core-developers/file-upload-interceptor.html
@@ -150,7 +150,13 @@
 
 << back to 
Interceptors
 
-File Upload Interceptor
+File Upload 
Interceptor
+
+
+  Parameters
+  Extending the Interceptor
+  Examples
+
 
 Since Struts 6.4.0 this interceptor is 
deprecated, please use Action File 
Upload Interceptor instead!
 
diff --git a/content/core-developers/interceptors.html 
b/content/core-developers/interceptors.html
index 8c8b7cdd4..1821f881d 100644
--- a/content/core-developers/interceptors.html
+++ b/content/core-developers/interceptors.html
@@ -640,7 +640,7 @@ specified in the 

(struts-site) branch fix/file-upload-navigation updated: Adds example with supporting multiple file uploads

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

lukaszlenart pushed a commit to branch fix/file-upload-navigation
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/fix/file-upload-navigation by 
this push:
 new 3dfff5792 Adds example with supporting multiple file uploads
3dfff5792 is described below

commit 3dfff57923db5153f11bba447cff4ab1077fc7d9
Author: Lukasz Lenart 
AuthorDate: Sun Mar 17 17:44:44 2024 +0100

Adds example with supporting multiple file uploads
---
 source/core-developers/action-file-upload.md | 63 +++-
 1 file changed, 52 insertions(+), 11 deletions(-)

diff --git a/source/core-developers/action-file-upload.md 
b/source/core-developers/action-file-upload.md
index 94f93950d..511cd440c 100644
--- a/source/core-developers/action-file-upload.md
+++ b/source/core-developers/action-file-upload.md
@@ -53,8 +53,8 @@ example:
 
 ```
 
-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:
+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 {
@@ -86,16 +86,13 @@ public class UploadAction extends ActionSupport implements 
UploadedFilesAware {
 As mentioned in the previous section one technique for uploading multiple 
files would be to simply have multiple form
 input elements of type file all with different names. This would require a 
number of setter methods that was equal to 3
 times the number of files being uploaded. Another option is to use Arrays or 
java.util.Lists. The following examples are
-taken from the Showcase example application that is part sample applications 
you can download
-at 
[http://struts.apache.org/download.cgi](http://struts.apache.org/download.cgi). 
For the Action mapping details
-see `struts-fileupload.xml` in the sample application download.
+taken from the Showcase example application that is part sample applications 
you can download at [download](http://struts.apache.org/download.cgi).
+For the Action mapping details  see `struts-fileupload.xml` in the sample 
application download.
 
-### Uploading Multiple Files using Arrays
-
-`multipleUploadUsingArray.jsp` Notice all file input types have the same name.
+`multipleUploadUsingList.jsp` Notice all file input types have the same name.
 
 ```html
-
+
 
 
 
@@ -103,8 +100,52 @@ see `struts-fileupload.xml` in the sample application 
download.
 
 ```
 
-The `org.apache.struts2.action.UploadedFilesAware` interface already supports 
uploading multiple files, you do not need 
-to  follow the below example.
+The `org.apache.struts2.action.UploadedFilesAware` interface already supports 
uploading multiple files:
+
+```java
+public class MultipleFileUploadUsingListAction extends ActionSupport 
implements UploadedFilesAware {
+
+private List uploads = new ArrayList<>();
+
+public List getUpload() {
+return this.uploads;
+}
+
+@Override
+public void withUploadedFiles(List uploads) {
+this.uploads = uploads;
+}
+
+private List getUploadFileNames() {
+return this.uploads.stream()
+.map(UploadedFile::getOriginalName)
+.collect(Collectors.toList());
+}
+
+private List getUploadContentTypes() {
+return this.uploads.stream()
+.map(UploadedFile::getContentType)
+.collect(Collectors.toList());
+}
+
+public String execute() throws Exception {
+System.out.println("files:");
+for (UploadedFile u : uploads) {
+System.out.println("*** " + u + "\t" + u.length());
+}
+System.out.println("filenames:");
+for (String n : getUploadFileNames()) {
+System.out.println("*** " + n);
+}
+System.out.println("content types:");
+for (String c : getUploadContentTypes()) {
+System.out.println("*** " + c);
+}
+System.out.println("\n\n");
+return SUCCESS;
+}
+}
+```
 
 ## Advanced Configuration
 



(struts) branch fix/file-uploads created (now db0bd4385)

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

lukaszlenart pushed a change to branch fix/file-uploads
in repository https://gitbox.apache.org/repos/asf/struts.git


  at db0bd4385 Converts multiple file uploads example to use Action based 
upload

This branch includes the following new commits:

 new db0bd4385 Converts multiple file uploads example to use Action based 
upload

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) 01/01: Converts multiple file uploads example to use Action based upload

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

lukaszlenart pushed a commit to branch fix/file-uploads
in repository https://gitbox.apache.org/repos/asf/struts.git

commit db0bd438551b8c646ede133bebdb5eae899b3cb3
Author: Lukasz Lenart 
AuthorDate: Sun Mar 17 17:45:32 2024 +0100

Converts multiple file uploads example to use Action based upload
---
 .../MultipleFileUploadUsingArrayAction.java| 82 +---
 .../MultipleFileUploadUsingListAction.java | 88 ++
 2 files changed, 76 insertions(+), 94 deletions(-)

diff --git 
a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
 
b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
index dcf671e5e..59ea954e2 100644
--- 
a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
+++ 
b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
@@ -22,61 +22,51 @@
 package org.apache.struts2.showcase.fileupload;
 
 import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.action.UploadedFilesAware;
+import org.apache.struts2.dispatcher.multipart.UploadedFile;
 
-import java.io.File;
+import java.util.List;
 
 /**
  * Showcase action - mutiple file upload using array.
- *
- * @version $Date$ $Id$
  */
-public class MultipleFileUploadUsingArrayAction extends ActionSupport {
-
-   private File[] uploads = new File[0];
-   private String[] uploadFileNames = new String[0];
-   private String[] uploadContentTypes = new String[0];
-
-
-   public String upload() throws Exception {
-   System.out.println("\n\n upload2");
-   System.out.println("files:");
-   for (File u : uploads) {
-   System.out.println("*** " + u + "\t" + u.length());
-   }
-   System.out.println("filenames:");
-   for (String n : uploadFileNames) {
-   System.out.println("*** " + n);
-   }
-   System.out.println("content types:");
-   for (String c : uploadContentTypes) {
-   System.out.println("*** " + c);
-   }
-   System.out.println("\n\n");
-   return SUCCESS;
-   }
+public class MultipleFileUploadUsingArrayAction extends ActionSupport 
implements UploadedFilesAware {
 
-   public File[] getUpload() {
-   return this.uploads;
-   }
+private List uploadedFiles;
 
-   public void setUpload(File[] upload) {
-   this.uploads = upload;
-   }
+public String upload() throws Exception {
+System.out.println("\n\n upload2");
+System.out.println("files:");
+for (UploadedFile u : uploadedFiles) {
+System.out.println("*** " + u + "\t" + u.length());
+}
+System.out.println("filenames:");
+for (String n : getUploadFileNames()) {
+System.out.println("*** " + n);
+}
+System.out.println("content types:");
+for (String c : getUploadContentTypes()) {
+System.out.println("*** " + c);
+}
+System.out.println("\n\n");
+return SUCCESS;
+}
 
-   public String[] getUploadFileName() {
-   return this.uploadFileNames;
-   }
+@Override
+public void withUploadedFiles(List uploadedFiles) {
+this.uploadedFiles = uploadedFiles;
+}
 
-   public void setUploadFileName(String[] uploadFileName) {
-   this.uploadFileNames = uploadFileName;
-   }
+private String[] getUploadFileNames() {
+return this.uploadedFiles.stream()
+.map(UploadedFile::getOriginalName)
+.toArray(String[]::new);
+}
 
-   public String[] getUploadContentType() {
-   return this.uploadContentTypes;
-   }
+private String[] getUploadContentTypes() {
+return this.uploadedFiles.stream()
+.map(UploadedFile::getContentType)
+.toArray(String[]::new);
+}
 
-   public void setUploadContentType(String[] uploadContentType) {
-   this.uploadContentTypes = uploadContentType;
-   }
 }
-// END SNIPPET: entire-file
\ No newline at end of file
diff --git 
a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
 
b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
index 7b4325e98..e60b0df3e 100644
--- 
a/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
+++ 
b/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
@@ -22,64 +22,56 @@
 package org.apache.struts2.showcase.fileupload;
 
 impor

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

2024-03-17 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 bb83e5427 Updates stage by Jenkins
bb83e5427 is described below

commit bb83e54274831024d1be8c53daf8188108d5a525
Author: jenkins 
AuthorDate: Sun Mar 17 16:46:33 2024 +

Updates stage by Jenkins
---
 content/core-developers/action-file-upload.html | 67 +++--
 1 file changed, 52 insertions(+), 15 deletions(-)

diff --git a/content/core-developers/action-file-upload.html 
b/content/core-developers/action-file-upload.html
index a37f9c2ab..8ceb5afcc 100644
--- a/content/core-developers/action-file-upload.html
+++ b/content/core-developers/action-file-upload.html
@@ -159,10 +159,7 @@
   Example JSP form tags:
 
   
-  Uploading Multiple Files
-  Uploading Multiple 
Files using Arrays
-
-  
+  Uploading Multiple Files
   Advanced Configuration
   Files Number Limit
   File 
Size Limits
@@ -216,8 +213,8 @@ example:
 
 
 
-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:
+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:
 
 public class UploadAction extends ActionSupport implements UploadedFilesAware {
   
@@ -248,15 +245,12 @@ information and content of uploaded file. Your action 
should implement the inter
 As mentioned in the previous section one technique for uploading multiple 
files would be to simply have multiple form
 input elements of type file all with different names. This would require a 
number of setter methods that was equal to 3
 times the number of files being uploaded. Another option is to use Arrays or 
java.util.Lists. The following examples are
-taken from the Showcase example application that is part sample applications 
you can download
-at http://struts.apache.org/download.cgi";>http://struts.apache.org/download.cgi.
 For the Action mapping details
-see struts-fileupload.xml in the sample application 
download.
-
-Uploading Multiple Files using 
Arrays
+taken from the Showcase example application that is part sample applications 
you can download at http://struts.apache.org/download.cgi";>download.
+For the Action mapping details  see struts-fileupload.xml in the sample application 
download.
 
-multipleUploadUsingArray.jsp Notice all file input 
types have the same name.
+multipleUploadUsingList.jsp Notice all file input 
types have the same name.
 
-
+
 
 
 
@@ -264,8 +258,51 @@ see struts-fileupload.xml
 
 
-The org.apache.struts2.action.UploadedFilesAware 
interface already supports uploading multiple files, you do not need 
-to  follow the below example.
+The org.apache.struts2.action.UploadedFilesAware 
interface already supports uploading multiple files:
+
+public class MultipleFileUploadUsingListAction extends ActionSupport implements UploadedFilesAware {
+
+private List uploads = 
new ArrayList<>();
+
+public List getUpload() {
+return this.uploads;
+}
+
+@Override
+public void withUploadedFiles(List uploads) {
+this.uploads = uploads;
+}
+
+private List 
getUploadFileNames() {
+return this.uploads.stream()
+.map(UploadedFile::getOriginalName)
+.collect(Collectors.toList());
+}
+
+private List 
getUploadContentTypes() {
+return this.uploads.stream()
+.map(UploadedFile::getContentType)
+.collect(Collectors.toList());
+}
+
+public String execute() throws Exception {
+System.out.println("files:");
+for (UploadedFile u : uploads) {
+System.out.println("*** " 
+ u + 
"\t" + u.length());
+}
+System.out.println("filenames:");
+for (String n : 
getUploadFileNames()) {
+System.out.println("*** " 
+ n);
+}
+System.out.println("content 
types:");
+for (String c : 
getUploadContentTypes()) {
+System.out.println("*** " 
+ c);
+}
+System.out.println("\n\n");
+return SUCCESS;
+}
+}
+
 
 Advanced Configuration
 



(struts-intellij-plugin) branch feature/ip-clearance updated (edcaab7 -> 1b64e8a)

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

lukaszlenart pushed a change to branch feature/ip-clearance
in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git


from edcaab7  Upgrades gradle wrapper
 add 1b64e8a  Upgrades to the latest IDEA version

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



(struts-examples) branch dependabot/github_actions/actions/checkout-4.1.2 created (now bd99a14)

2024-03-17 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/github_actions/actions/checkout-4.1.2
in repository https://gitbox.apache.org/repos/asf/struts-examples.git


  at bd99a14  Bump actions/checkout from 4.1.1 to 4.1.2

No new revisions were added by this update.



(struts-examples) branch dependabot/maven/org.springframework-spring-web-6.1.5 created (now 1583d81)

2024-03-17 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/org.springframework-spring-web-6.1.5
in repository https://gitbox.apache.org/repos/asf/struts-examples.git


  at 1583d81  Bump org.springframework:spring-web from 6.1.4 to 6.1.5

No new revisions were added by this update.