javax.validation.ValidationException: HV000183: Unable to load ‘javax.el.ExpressionFactory’. Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead

I got this exception when I executed my newly written junit test for a Spring DAO with Hibernate Validations.

After adding javax.el to pom, this is resolved.


<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.el</artifactId>
<version>2.2.4</version>
</dependency>

 

Advertisements

ModelAndView object is not printed on JSP

I am bundling my ModelAndView with my output as below.

modelAndView.addObject("expenseList", new ExpenseDAO().getExpenseRecords());

When I try to retrieve it in jsp as ${expenseList}, it is just printed as ${expenseList}, not the real value.

WR_20140702011432

Thanks to mkyong who mentioned that it is disabled in jsp 1.x. We need to enable EL explicitly with the follwing tag.

<%@ page isELIgnored="false" %>