Some error in the language configuration of the <jsp-config> expression

There is one problem with EL configuration:

<%@ page isELIgnored="false" %>
${10 + 15}<br>

      

When using the instructions above, I get the perfect result, i.e. 25. Now I want isELIgnored="false"

for the whole web application, so I changed the web.xml as:

<?xml version="1.0" encoding="UTF-8"?>
<web-app>
    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jsp</url-pattern>
            <el-ignored>false</el-ignored>
        </jsp-property-group>
    </jsp-config>
</web-app>

      

But the correct conclusion is not obtained. What's wrong there? Are some extra steps required or what? Please, help.

Thank you in advance

+3


source to share


2 answers


Change web.xml

to a version that supports EL (2.5+ XSD)

:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
     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_2_5.xsd"
     version="2.5">

</web-app>

      



or any version

<?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>

      

+3


source


Ankur-singhals answer worked for me.



<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:web="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <jsp-config>
        <jsp-property-group>
           <url-pattern>*.jsp</url-pattern>
           <el-ignored>false</el-ignored>
        </jsp-property-group>
    </jsp-config>
</web-app>

      

0


source







All Articles