12 Replies Latest reply on Aug 12, 2016 10:12 AM by arthurborsboom

    Java EE 7 + EL 3.0 + Wildfly 10 - returns empty string on constant


      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">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        2 + 2 = ${2 + 2}
        ContextPath: ${pageContext.servletContext.contextPath}
        Boolean.TRUE: ---${Boolean.TRUE}---
        Integer.MAX_VALUE: ---${Integer.MAX_VALUE}---

      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?