This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch feature/WW-5444-html5 in repository https://gitbox.apache.org/repos/asf/struts.git
commit f4110d1d693911ddae88ca6a26c23e7d3f2c0dc6 Author: Lukasz Lenart <[email protected]> AuthorDate: Sun Nov 23 18:12:24 2025 +0100 feat(themes): move html5 theme from showcase to core - Move 42 FreeMarker templates to core/src/main/resources/template/html5/ - Remove duplicate templates from showcase - Makes html5 theme available to all applications via struts2-core.jar - Enables unit testing in core module - Fix Html5Action import from XWork2 to Struts2 package - Add Apache license header to Html5Action Resolves WW-5444 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --- .../struts2/showcase/action/Html5Action.java | 22 ++++++++++++++++++++-- .../src/main/resources/template/html5/a-close.ftl | 0 .../src/main/resources/template/html5/a.ftl | 0 .../main/resources/template/html5/actionerror.ftl | 0 .../resources/template/html5/actionmessage.ftl | 0 .../src/main/resources/template/html5/checkbox.ftl | 0 .../main/resources/template/html5/checkboxlist.ftl | 0 .../src/main/resources/template/html5/combobox.ftl | 0 .../resources/template/html5/common-attributes.ftl | 0 .../resources/template/html5/controlfooter.ftl | 0 .../resources/template/html5/controlheader.ftl | 0 .../src/main/resources/template/html5/css.ftl | 0 .../resources/template/html5/datetextfield.ftl | 0 .../src/main/resources/template/html5/debug.ftl | 0 .../main/resources/template/html5/doubleselect.ftl | 0 .../template/html5/dynamic-attributes.ftl | 0 .../src/main/resources/template/html5/empty.ftl | 0 .../main/resources/template/html5/fielderror.ftl | 0 .../src/main/resources/template/html5/file.ftl | 0 .../main/resources/template/html5/form-close.ftl | 0 .../src/main/resources/template/html5/form.ftl | 0 .../src/main/resources/template/html5/head.ftl | 0 .../src/main/resources/template/html5/hidden.ftl | 0 .../template/html5/inputtransferselect.ftl | 0 .../src/main/resources/template/html5/label.ftl | 0 .../src/main/resources/template/html5/link.ftl | 0 .../src/main/resources/template/html5/nonce.ftl | 0 .../src/main/resources/template/html5/optgroup.ftl | 0 .../template/html5/optiontransferselect.ftl | 0 .../src/main/resources/template/html5/password.ftl | 0 .../template/html5/prefixed-dynamic-attributes.ftl | 0 .../src/main/resources/template/html5/radiomap.ftl | 0 .../src/main/resources/template/html5/reset.ftl | 0 .../main/resources/template/html5/script-close.ftl | 0 .../src/main/resources/template/html5/script.ftl | 0 .../resources/template/html5/scripting-events.ftl | 0 .../src/main/resources/template/html5/select.ftl | 0 .../main/resources/template/html5/submit-close.ftl | 0 .../src/main/resources/template/html5/submit.ftl | 0 .../src/main/resources/template/html5/text.ftl | 0 .../src/main/resources/template/html5/textarea.ftl | 0 .../src/main/resources/template/html5/token.ftl | 0 .../main/resources/template/html5/updownselect.ftl | 0 43 files changed, 20 insertions(+), 2 deletions(-) diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java index b80c73d75..a4e6b2d7d 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java @@ -1,6 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.struts2.showcase.action; -import com.opensymphony.xwork2.ActionSupport; +import org.apache.struts2.ActionSupport; public class Html5Action extends ActionSupport { @@ -8,7 +26,7 @@ public class Html5Action extends ActionSupport { public String execute() throws Exception { addActionError("Action error: only html5"); addActionMessage("Action message: only html5"); - addFieldError("testField","Field error: only html5"); + addFieldError("testField", "Field error: only html5"); return super.execute(); } } diff --git a/apps/showcase/src/main/resources/template/html5/a-close.ftl b/core/src/main/resources/template/html5/a-close.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/a-close.ftl rename to core/src/main/resources/template/html5/a-close.ftl diff --git a/apps/showcase/src/main/resources/template/html5/a.ftl b/core/src/main/resources/template/html5/a.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/a.ftl rename to core/src/main/resources/template/html5/a.ftl diff --git a/apps/showcase/src/main/resources/template/html5/actionerror.ftl b/core/src/main/resources/template/html5/actionerror.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/actionerror.ftl rename to core/src/main/resources/template/html5/actionerror.ftl diff --git a/apps/showcase/src/main/resources/template/html5/actionmessage.ftl b/core/src/main/resources/template/html5/actionmessage.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/actionmessage.ftl rename to core/src/main/resources/template/html5/actionmessage.ftl diff --git a/apps/showcase/src/main/resources/template/html5/checkbox.ftl b/core/src/main/resources/template/html5/checkbox.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/checkbox.ftl rename to core/src/main/resources/template/html5/checkbox.ftl diff --git a/apps/showcase/src/main/resources/template/html5/checkboxlist.ftl b/core/src/main/resources/template/html5/checkboxlist.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/checkboxlist.ftl rename to core/src/main/resources/template/html5/checkboxlist.ftl diff --git a/apps/showcase/src/main/resources/template/html5/combobox.ftl b/core/src/main/resources/template/html5/combobox.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/combobox.ftl rename to core/src/main/resources/template/html5/combobox.ftl diff --git a/apps/showcase/src/main/resources/template/html5/common-attributes.ftl b/core/src/main/resources/template/html5/common-attributes.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/common-attributes.ftl rename to core/src/main/resources/template/html5/common-attributes.ftl diff --git a/apps/showcase/src/main/resources/template/html5/controlfooter.ftl b/core/src/main/resources/template/html5/controlfooter.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/controlfooter.ftl rename to core/src/main/resources/template/html5/controlfooter.ftl diff --git a/apps/showcase/src/main/resources/template/html5/controlheader.ftl b/core/src/main/resources/template/html5/controlheader.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/controlheader.ftl rename to core/src/main/resources/template/html5/controlheader.ftl diff --git a/apps/showcase/src/main/resources/template/html5/css.ftl b/core/src/main/resources/template/html5/css.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/css.ftl rename to core/src/main/resources/template/html5/css.ftl diff --git a/apps/showcase/src/main/resources/template/html5/datetextfield.ftl b/core/src/main/resources/template/html5/datetextfield.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/datetextfield.ftl rename to core/src/main/resources/template/html5/datetextfield.ftl diff --git a/apps/showcase/src/main/resources/template/html5/debug.ftl b/core/src/main/resources/template/html5/debug.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/debug.ftl rename to core/src/main/resources/template/html5/debug.ftl diff --git a/apps/showcase/src/main/resources/template/html5/doubleselect.ftl b/core/src/main/resources/template/html5/doubleselect.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/doubleselect.ftl rename to core/src/main/resources/template/html5/doubleselect.ftl diff --git a/apps/showcase/src/main/resources/template/html5/dynamic-attributes.ftl b/core/src/main/resources/template/html5/dynamic-attributes.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/dynamic-attributes.ftl rename to core/src/main/resources/template/html5/dynamic-attributes.ftl diff --git a/apps/showcase/src/main/resources/template/html5/empty.ftl b/core/src/main/resources/template/html5/empty.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/empty.ftl rename to core/src/main/resources/template/html5/empty.ftl diff --git a/apps/showcase/src/main/resources/template/html5/fielderror.ftl b/core/src/main/resources/template/html5/fielderror.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/fielderror.ftl rename to core/src/main/resources/template/html5/fielderror.ftl diff --git a/apps/showcase/src/main/resources/template/html5/file.ftl b/core/src/main/resources/template/html5/file.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/file.ftl rename to core/src/main/resources/template/html5/file.ftl diff --git a/apps/showcase/src/main/resources/template/html5/form-close.ftl b/core/src/main/resources/template/html5/form-close.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/form-close.ftl rename to core/src/main/resources/template/html5/form-close.ftl diff --git a/apps/showcase/src/main/resources/template/html5/form.ftl b/core/src/main/resources/template/html5/form.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/form.ftl rename to core/src/main/resources/template/html5/form.ftl diff --git a/apps/showcase/src/main/resources/template/html5/head.ftl b/core/src/main/resources/template/html5/head.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/head.ftl rename to core/src/main/resources/template/html5/head.ftl diff --git a/apps/showcase/src/main/resources/template/html5/hidden.ftl b/core/src/main/resources/template/html5/hidden.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/hidden.ftl rename to core/src/main/resources/template/html5/hidden.ftl diff --git a/apps/showcase/src/main/resources/template/html5/inputtransferselect.ftl b/core/src/main/resources/template/html5/inputtransferselect.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/inputtransferselect.ftl rename to core/src/main/resources/template/html5/inputtransferselect.ftl diff --git a/apps/showcase/src/main/resources/template/html5/label.ftl b/core/src/main/resources/template/html5/label.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/label.ftl rename to core/src/main/resources/template/html5/label.ftl diff --git a/apps/showcase/src/main/resources/template/html5/link.ftl b/core/src/main/resources/template/html5/link.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/link.ftl rename to core/src/main/resources/template/html5/link.ftl diff --git a/apps/showcase/src/main/resources/template/html5/nonce.ftl b/core/src/main/resources/template/html5/nonce.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/nonce.ftl rename to core/src/main/resources/template/html5/nonce.ftl diff --git a/apps/showcase/src/main/resources/template/html5/optgroup.ftl b/core/src/main/resources/template/html5/optgroup.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/optgroup.ftl rename to core/src/main/resources/template/html5/optgroup.ftl diff --git a/apps/showcase/src/main/resources/template/html5/optiontransferselect.ftl b/core/src/main/resources/template/html5/optiontransferselect.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/optiontransferselect.ftl rename to core/src/main/resources/template/html5/optiontransferselect.ftl diff --git a/apps/showcase/src/main/resources/template/html5/password.ftl b/core/src/main/resources/template/html5/password.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/password.ftl rename to core/src/main/resources/template/html5/password.ftl diff --git a/apps/showcase/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl b/core/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl rename to core/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl diff --git a/apps/showcase/src/main/resources/template/html5/radiomap.ftl b/core/src/main/resources/template/html5/radiomap.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/radiomap.ftl rename to core/src/main/resources/template/html5/radiomap.ftl diff --git a/apps/showcase/src/main/resources/template/html5/reset.ftl b/core/src/main/resources/template/html5/reset.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/reset.ftl rename to core/src/main/resources/template/html5/reset.ftl diff --git a/apps/showcase/src/main/resources/template/html5/script-close.ftl b/core/src/main/resources/template/html5/script-close.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/script-close.ftl rename to core/src/main/resources/template/html5/script-close.ftl diff --git a/apps/showcase/src/main/resources/template/html5/script.ftl b/core/src/main/resources/template/html5/script.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/script.ftl rename to core/src/main/resources/template/html5/script.ftl diff --git a/apps/showcase/src/main/resources/template/html5/scripting-events.ftl b/core/src/main/resources/template/html5/scripting-events.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/scripting-events.ftl rename to core/src/main/resources/template/html5/scripting-events.ftl diff --git a/apps/showcase/src/main/resources/template/html5/select.ftl b/core/src/main/resources/template/html5/select.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/select.ftl rename to core/src/main/resources/template/html5/select.ftl diff --git a/apps/showcase/src/main/resources/template/html5/submit-close.ftl b/core/src/main/resources/template/html5/submit-close.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/submit-close.ftl rename to core/src/main/resources/template/html5/submit-close.ftl diff --git a/apps/showcase/src/main/resources/template/html5/submit.ftl b/core/src/main/resources/template/html5/submit.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/submit.ftl rename to core/src/main/resources/template/html5/submit.ftl diff --git a/apps/showcase/src/main/resources/template/html5/text.ftl b/core/src/main/resources/template/html5/text.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/text.ftl rename to core/src/main/resources/template/html5/text.ftl diff --git a/apps/showcase/src/main/resources/template/html5/textarea.ftl b/core/src/main/resources/template/html5/textarea.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/textarea.ftl rename to core/src/main/resources/template/html5/textarea.ftl diff --git a/apps/showcase/src/main/resources/template/html5/token.ftl b/core/src/main/resources/template/html5/token.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/token.ftl rename to core/src/main/resources/template/html5/token.ftl diff --git a/apps/showcase/src/main/resources/template/html5/updownselect.ftl b/core/src/main/resources/template/html5/updownselect.ftl similarity index 100% rename from apps/showcase/src/main/resources/template/html5/updownselect.ftl rename to core/src/main/resources/template/html5/updownselect.ftl
