String path = request.getContextPath();获取应用的上下文路径。

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    
    response.setHeader("Pragma","no-cache");
    response.setHeader("Cache-Control","no-cache");
    response.setDateHeader("Expires", 0);
    
    String date = new SimpleDateFormat("yyyyMMddhhmmss").format(new Date());
%>

你可能感兴趣的:(html,jsp,servlet)