[color=darkred]下 载[/color]
这种方式可以实现超链接下载,我现在的问题是要怎么获取到当服务器端的路径呢?而且要http的形式?
[color=red]http://localhost:8080/olas/[/color]upload/aa.doc
也就是前面这一串。
jsp里面添加
[code="java"]
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
//然后
通用的 部署在任何服务器都可以获取到路径