It was supported with EL 2.2, which was released on December 10, 2009 (more than 2.5 years ago!). EL 2.2 goes hand in hand with Servlet 3.0, so if you are targeting a Servlet 3.0 container ( Tomcat 7 , Glassfish 3 , etc.) with a compatible Servlet 3.0 web.xmlthat looks like this
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app>
then you can call methods with or without arguments in EL in the following forms:
${t.test()}
${t.someOtherMethod('foo')}
source
share