【发布时间】:2017-01-13 10:41:49
【问题描述】:
我正在尝试使用一个 rest 调用,它获取文件在 os.s 中的位置。 作为回报,其余调用模拟文件的下载。
下面是代码
<div class="form-container">
<h1>Welcome to CoinPay</h1>
Click on below links to download Coin.<br /><br />
<a href="<c:url value='/download/<%=request.getParameter("dest") %>' />">Coin Mobile
Application</a>
</div>
在参数"dest" 中的值为D:/coinFiles/Coin-v1.1.8.apk。
下面给出其余调用定义
@RequestMapping(value="/download/{dest}", method = RequestMethod.GET)
public void downloadFile(HttpServletResponse response, @PathVariable("dest") String dest) throws IOException {
}
由于某种原因,href 创建的链接无法访问其余调用。
我该怎么做。任何帮助表示赞赏。 提前谢谢你。
【问题讨论】:
标签: java rest jsp jstl scriptlet