不知道如何遍历<c:forEach>中提供的项目

问题描述

我在jsp中使用allCourses对象,但遇到异常,我试图在我引用过this post

的jsp中遍历地图
@RequestMapping(value="showCourses",method=RequestMethod.POST)
    public ModelAndView showCourses(@RequestParam("interest") String interest) throws sqlException,IOException {
        Map<String,String> allCourses=serviceImpl.getCourseList(interest);
        ModelAndView mv=new ModelAndView();
        mv.addobject("course",allCourses);
        mv.addobject("interest",interest);
        mv.setViewName("showCourses");
        return mv;
    }

<c:forEach items="${course}" var="course">
        <c:forEach items="${course}" var="entry">
        ${entry.key}<br> 
        ${entry.value}<br>
        </c:forEach>
    </c:forEach>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)