According to this Stack Overflow answer, it should be possible to retrieve the value of a constant by using Expression Language 3.0
According to this article, Wildfly 10 has implemented Java EE 7 and EL 3.0
However, when I create a new Dynamic Web Project in Eclipse with a new empty JSP file with two constant references and deploy it to Wildfly 10, the variables are presented as empty (or non-existing).
This is the example JSP page.
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>title</title>
</head>
<body>
2 + 2 = ${2 + 2}<br>
ContextPath: ${pageContext.servletContext.contextPath}<br>
Boolean.TRUE: ---${Boolean.TRUE}---<br>
Integer.MAX_VALUE: ---${Integer.MAX_VALUE}---<br>
</body>
</html>
And this is the result in the browser.
2 + 2 = 4
ContextPath: /helloworld
Boolean.TRUE: ------
Integer.MAX_VALUE: ------
What is the reason that these variables are returned empty?