Skip to content

Commit

Permalink
WW-5411 Delete unsupported static field templating
Browse files Browse the repository at this point in the history
  • Loading branch information
kusalk committed Jul 26, 2024
1 parent bf56c59 commit 9d62406
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
*/
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;
import java.util.List;

public class Hangman implements Serializable {

private static final Logger log = LogManager.getLogger(Hangman.class);

@Serial
private static final long serialVersionUID = 8566954355839652509L;

Expand Down Expand Up @@ -64,8 +69,8 @@ public void guess(Character character) {
}
if (vocab.containsAllCharacter(charactersGuessed)) {
win = true;
log.info("Game won");
}
System.out.println(" *********************************** " + win);
}
}

Expand Down
1 change: 0 additions & 1 deletion apps/showcase/src/main/resources/struts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"/>
<constant name="struts.allowlist.classes" value="
org.apache.struts2.showcase.hangman.Hangman,
org.apache.struts2.showcase.hangman.HangmanConstants,
org.apache.struts2.showcase.hangman.Vocab
"/>

Expand Down
14 changes: 0 additions & 14 deletions apps/showcase/src/main/webapp/WEB-INF/tags/non-ui/ifTag/testIf.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* under the License.
*/
-->
<%@page import="org.apache.struts2.showcase.hangman.HangmanConstants" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
Expand Down Expand Up @@ -636,18 +635,5 @@
</div>
</div>
</div>
<br>
<br>
<p>
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.
</p>
<br>
<div>
Test public static (constant) access (expression). Value: <s:property default="unavailable" value="@org.apache.struts2.showcase.hangman.HangmanConstants@HANGMAN_SESSION_KEY" />
</div>
<div>
Test public static (constant) access (scriptlet). Value: <%=org.apache.struts2.showcase.hangman.HangmanConstants.HANGMAN_SESSION_KEY%>
</div>
</body>
</html>

0 comments on commit 9d62406

Please sign in to comment.