-1

I am making a spring MVC project which is XML free(except POM). I have used java based configuration for dispatcher servlet and the required beans.

I am not able to access data on my view (JSP) using model. This is my controller from where i am adding data to the model

This is my jsp page where i am trying to print my list of students i.e "students"

this is the result i am getting

I tried using isELIgnored="false attribute but my jsp is showing isELIgnored as undefined attribute. All the solutions on internet for this are for xml based configuration. Please help!!!!

  • Hello, welcome to StackOverflow. It is much more well received if you provide your code as text rather than as an image. As such, I suggest you to edit your question and add all relevant code. Images are good whenever you cannot give something easily describable, but code pretty much describes itself and this site provides the tools for properly format it. – Jetto Martínez Jan 10 '22 at 20:19

1 Answers1

0

Before accessing the model in JSP, declare the core JSTL taglib, and add JSTL jar files to the project. See:- Different ways to add JSTL

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<body>
    ${students}
    <!-- Other operations -->
</body>
  • I tried adding JSTL declaration line in my jsp page but it didn't help. I already have all the required jar files for my project – Swastik Gupta Jan 14 '22 at 18:55