hiii i am using spring MVC and i have list which ia m sending as my response to jsp but ibn in this jsp i have a attribute isnew which is of type boolean so i want a comaprison on this attribute soo sode is
<core:forEach var="i" items="${loginsuccess}" >
<core:if test="${i.isNew eq true}">
<core:out value="${i.notofication}"></core:out> </br>
</core:if>
</core:forEach>
DAO CODE
@Autowired
SessionFactory usermanagementSessionFactory;
public ModelAndView getNotifications(int id){
System.out.println("Method ios called");
Session session = usermanagementSessionFactory.openSession();
System.out.println("after Getting Session");
int id1 = id;
System.out.println(id1);
Query query=(Query) session.getNamedQuery("getNotification");
query.setInteger("userId",id1);
List<Message> list1= query.list();
ModelAndView mv = new ModelAndView("notifications");
mv.addObject("loginsuccess" ,list1);
return mv;
}
its not working please suggest me how can i resolve this problem
检查它是如何工作的。我只想在通知是新的时才显示通知,这是返回登录成功的 dao 代码,控制器仅将此代码作为简单方法调用