1.在jsp页面获取项目名称的两种常用方式
(1)<%=this.getServletContext().getContextPath() %>
(2)${pageContext.request.contextPath}
2.后台告诉浏览器需要下载文件
response.setContentType("text/html;charset=utf-8");
response.setHeader("content-Disposition","attachment;filename=" +文件名称);