jsp页面c:forEach循环显示数据库信息没有数据
@RequestMapping("signuprecord")publicModelAndViewsignuprecord(Integerid){List<SignUpR...
@RequestMapping("signuprecord")
public ModelAndView signuprecord(Integer id){
List<SignUpRecord> records = signUpRecordService.findSignUserByTripId(id);
ModelAndView mav = new ModelAndView();
mav.setViewName("report.jsp");
mav.addObject("records", records);
return mav;
}//这是action
<c:forEach items="${records}" var="list">
<div class="row">
<div class="col-sm-4">
<img src="images/test/1.jpg" alt="" class="img-circle center-block" width="50%;" style="margin-top: 8px;">
</div>
<div class="col-sm-8">
<div class="row">
<div class="col-sm-6">
<p class="name">张三(${list.leader})</p>
</div>
<div class="col-sm-3 text-center" style="background-color: #08b2c7;color:#fff;border-radius:25px;margin-top: 7px;">
${list.introduce}
</div>
</div>
<div class="row">
<div class="col-sm-9">
<p class="intro">${list.introduce}</p>
</div>
</div>
</div>
</div>
</c:forEach>//这是jsp上的for循环
2015-08-24 15:28:16 [com.paoper.core.dao.api.SignUpRecordEntityMapper.selectByExample]-[DEBUG] ==> Preparing: select id, create_id, create_time, modify_id, modity_time, introduce, leader, avator, user_id, group_trip_id from signup_record WHERE ( group_trip_id = ? )
2015-08-24 15:28:16 [com.paoper.core.dao.api.SignUpRecordEntityMapper.selectByExample]-[DEBUG] ==> Parameters: 8(Integer)
2015-08-24 15:28:17 [com.paoper.core.dao.api.SignUpRecordEntityMapper.selectByExample]-[DEBUG] <== Total: 8//这是后台返回的数据,查询到8条信息但是就是不在jsp页面显示
是不是在jsp上需要导特别的包 展开
public ModelAndView signuprecord(Integer id){
List<SignUpRecord> records = signUpRecordService.findSignUserByTripId(id);
ModelAndView mav = new ModelAndView();
mav.setViewName("report.jsp");
mav.addObject("records", records);
return mav;
}//这是action
<c:forEach items="${records}" var="list">
<div class="row">
<div class="col-sm-4">
<img src="images/test/1.jpg" alt="" class="img-circle center-block" width="50%;" style="margin-top: 8px;">
</div>
<div class="col-sm-8">
<div class="row">
<div class="col-sm-6">
<p class="name">张三(${list.leader})</p>
</div>
<div class="col-sm-3 text-center" style="background-color: #08b2c7;color:#fff;border-radius:25px;margin-top: 7px;">
${list.introduce}
</div>
</div>
<div class="row">
<div class="col-sm-9">
<p class="intro">${list.introduce}</p>
</div>
</div>
</div>
</div>
</c:forEach>//这是jsp上的for循环
2015-08-24 15:28:16 [com.paoper.core.dao.api.SignUpRecordEntityMapper.selectByExample]-[DEBUG] ==> Preparing: select id, create_id, create_time, modify_id, modity_time, introduce, leader, avator, user_id, group_trip_id from signup_record WHERE ( group_trip_id = ? )
2015-08-24 15:28:16 [com.paoper.core.dao.api.SignUpRecordEntityMapper.selectByExample]-[DEBUG] ==> Parameters: 8(Integer)
2015-08-24 15:28:17 [com.paoper.core.dao.api.SignUpRecordEntityMapper.selectByExample]-[DEBUG] <== Total: 8//这是后台返回的数据,查询到8条信息但是就是不在jsp页面显示
是不是在jsp上需要导特别的包 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询