0

i dont get EL 3.0 to work in Apache Tomcat 8. However EL 2.2 works perfect.

How i testet it: I made a JSP like that:

${'concat'+'test'}

Result: NumberFormatException: For input string: "concat"

EL 2.2 works fine:

${'concat'.concat('test')}

Result: concattest

This is my Webapp web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                      http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">

...

</web-app>

This is my global web.xml:

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                      http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
  version="3.1">

...

    <init-param>
        <param-name>compiler</param-name>
        <param-value>ecj</param-value>
    </init-param>

Tomcat-Version: Apache Tomcat/8.0.47

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Pl3tx235j
  • 13
  • 4

1 Answers1

0

Is it the correct syntax?

If you check this SO question, BalusC is given examples for string concatenation. The one for EL 3.0 looks like this:

${'concat' += 'test'}
Georg Leber
  • 3,470
  • 5
  • 40
  • 63
  • I took the syntax from a youtube presentation. You are right. "+=" runs. But other code like static methode invocation is still disfunctional. Maybe the hole Presentation was bullshit. Thanks.. – Pl3tx235j Jan 24 '18 at 15:52