【发布时间】:2015-10-06 06:18:27
【问题描述】:
我上传了一些图片,并将其保存到此路径中的目录中: C:\Users\user\Inoesis Spring Projects.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\HDTS/photos。
I have uploaded some images and it got saved into a directory in this path:
C:\Users\user\Inoesis Spring Projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\HDTS/photos. Handler method in the Controller:
@RequestMapping(value={"/", "home"})
public ModelAndView showIndex(){
return new ModelAndView("index", "artistList", artistService.getArtistsByLikes());
}
view : index.jsp
<c:if test="${not empty artistList }">
<c:forEach items="${artistList }" var="artistInfo">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"> <span class="glyphicon glyphicon-user"></span> <c:out value="${ artistInfo.stageName}"/> </h3>
</div>
<div class="panel-body">
<img alt="" src="<%=request.getContextPath()%>/photos/${artistInfo.photoName}">
</div><!-- /.panel-body -->
</div><!-- /.panel panel-primary -->
</div><!-- /.col-md-4 -->
</c:forEach>
</c:if>
Pls note my project is HDTS.
How do i display them on a jsp page.
thanks
请注意我的项目是 HDTS。 我如何在 jsp 页面上显示它们。 谢谢
【问题讨论】: