There are many hints through the web suggesting that the version in web.xml
, <web-app version="xxx">
must match the current API used (and expected) by the corresponding application. E.g.:
- Java web app - What determines my Servlet API version? Does it get specified in web.xml?
- What exactly is the web-app version? What does it affect?
- org.apache.jasper.JasperException: The function test must be used with a prefix when a default namespace is not specified
- How can I check what version of EL is server using
- webapp version 2.4 to 2.5 out of memory
But I have failed to prove it. Does this version
has any effect when compiling the JSPs?
Background
I've been debugging a [...] JasperException: somewhere.jsp(69,10) The function concat must be used with a prefix when a default namespace is not specified
in a Tomcat 6.0.45.
After some research, I found that the somewhere.jsp
invokes a bean method with arguments, something only support in EL 2.2+ (see for example Differences between EL 2.1 and 2.2). So far so good: Tomcat 6.0.45 is a servlet 2.5 container that only supports EL 2.1.
But I then installed the same app on a Tomcat 8.0.32 (Servlet 3.1, EL 3.0), and with the same web.xml
, the failure doesn't display, something that surprises me, because in the web.xml
, I have version="2.4"
.
I have also failed with further attempts to tweak the Servlet API version used to compile and run the JSPs by only changing this version
attribute, so I'm quite puzzled.