mirror of
https://github.com/apache/struts.git
synced 2026-08-05 14:47:09 +00:00
WW-5411 Delete unsupported static field templating
This commit is contained in:
@@ -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 @@ 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;
|
||||
|
||||
@@ -64,8 +69,8 @@ public class Hangman implements Serializable {
|
||||
}
|
||||
if (vocab.containsAllCharacter(charactersGuessed)) {
|
||||
win = true;
|
||||
log.info("Game won");
|
||||
}
|
||||
System.out.println(" *********************************** " + win);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
"/>
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<%@page import="org.apache.struts2.showcase.hangman.HangmanConstants" %>
|
||||
<%@taglib prefix="s" uri="/struts-tags" %>
|
||||
<html>
|
||||
<head>
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user