-1

I am learning spring MVC and using JSP as view and willing to use JSP expression tag like

${name }

For this i am using following attribute

<%@ page isELIgnored = "false" %>

But getting eclipse warning (Undefined attribute name "isELIgnored") and my webpage is crashing with below error

Message org.apache.jasper.JasperException: javax.el.ELException: Failed to parse the expression [${...}]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: javax.el.ELException: Failed to parse the expression [${...}]

How can i proceed further?

PS078
  • 431
  • 1
  • 6
  • 18

3 Answers3

1
  <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  
  <%@page isELIgnored="false"%>

Remember to add isELIgnored after taglib directive otherwise it won't work.

And add below dependencies

<dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <scope>provided</scope>
        </dependency>
    
    <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>


    <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
    </dependency>
1

I was facing the same problem, am providing a solution that worked in my case. Add this code web.xml file,Just replace <web-app> tag with this one

  <?xml version="1.0" encoding="ISO-8859-1" ?>
<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" >
Swapnil
  • 94
  • 1
  • 12
0

How to install JSTL? The absolute uri: http://java.sun.com/jstl/core cannot be resolved

Refer to above page as it does the same thing and forget about adding "isELIgnored" as i think it is a internal glitch of the software. The dependency told in this page is about the JSTL expression which still makes your code lighter and shorter.

e.g If you want to print anything from JSP just write--> <c:out value="[fetchedPropertyName]"/>

Also check for similar syntaxes for further usage.