附件下载

使用a标签,href链接里填写:

根据jfinal总控类里找到添加下载图片文件的方法位置,以${contextPath}/aaa/bbb?ccc=${链接目标}(aaa是类名,bbb是方法名,ccc是要用到的功能)

${contextPath}路径 ||  target="_blank" : targeta标签的打开方式,“_blank” 在新页面打开

例:

<div class="form-group">
<label class="col-sm-3 no-padding-right" style="text-align: right;"> 附件: </label>
<label class="col-sm-9 no-padding-right" style="text-align: left;"><a href="${contextPath}/imageFile/downloadFile?filePath=${solutionInfo.attachment}" target="_blank"> 下载附件 </a></label>
</div>

原文地址:https://www.cnblogs.com/FloraIgnace/p/6133875.html