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" %>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s