From 9d624069aa61ce1489f863bfc9af08400aca51b5 Mon Sep 17 00:00:00 2001 From: Kusal Kithul-Godage Date: Fri, 26 Jul 2024 17:03:51 +1000 Subject: [PATCH] WW-5411 Delete unsupported static field templating --- .../apache/struts2/showcase/hangman/Hangman.java | 7 ++++++- apps/showcase/src/main/resources/struts.xml | 1 - .../webapp/WEB-INF/tags/non-ui/ifTag/testIf.jsp | 14 -------------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java index 99696ce3a3..dc21c91b4d 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java @@ -20,6 +20,9 @@ */ package org.apache.struts2.showcase.hangman; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import java.io.Serial; import java.io.Serializable; import java.util.ArrayList; @@ -27,6 +30,8 @@ public class Hangman implements Serializable { + private static final Logger log = LogManager.getLogger(Hangman.class); + @Serial private static final long serialVersionUID = 8566954355839652509L; @@ -64,8 +69,8 @@ public void guess(Character character) { } if (vocab.containsAllCharacter(charactersGuessed)) { win = true; + log.info("Game won"); } - System.out.println(" *********************************** " + win); } } diff --git a/apps/showcase/src/main/resources/struts.xml b/apps/showcase/src/main/resources/struts.xml index d0f57325d8..45ab3a5e0d 100644 --- a/apps/showcase/src/main/resources/struts.xml +++ b/apps/showcase/src/main/resources/struts.xml @@ -42,7 +42,6 @@ "/> diff --git a/apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/ifTag/testIf.jsp b/apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/ifTag/testIf.jsp index a0d52a6777..f9fe499971 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/ifTag/testIf.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/ifTag/testIf.jsp @@ -18,7 +18,6 @@ * under the License. */ --> -<%@page import="org.apache.struts2.showcase.hangman.HangmanConstants" %> <%@taglib prefix="s" uri="/struts-tags" %> @@ -636,18 +635,5 @@ -
-
-

- A secondary test for this JSP visually verifies expression access to a public constant. - A direct access to the same public constant via scriptlet provides secondary verification. -

-
-
- Test public static (constant) access (expression). Value: -
-
- Test public static (constant) access (scriptlet). Value: <%=org.apache.struts2.showcase.hangman.HangmanConstants.HANGMAN_SESSION_KEY%> -