3

One EL config issue is there:

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

While using the above statements I am getting the perfect output i.e. 25. Now I want to isELIgnored="false" for the entire web application so I modified 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 not getting the proper output. What is wrong over there? Some additional steps are required or what? Please help.

Thanks in advance

Shashank
  • 712
  • 15
  • 33

2 Answers2

3

Change your 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 whichever 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>
Ankur Singhal
  • 26,012
  • 16
  • 82
  • 116
0

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>
Shashank
  • 712
  • 15
  • 33