设置通用jsp里面的路径

来源:互联网 发布:安卓调音软件 编辑:程序博客网 时间:2024/06/03 20:24
<%    String path = request.getContextPath();    String basePath = request.getScheme() + "://"            + request.getServerName() + ":" + request.getServerPort()            + path+"/" ;    String serverPath = request.getScheme() + "://"            + request.getServerName() + ":" + request.getServerPort();    request.setAttribute("ctx", basePath);    request.setAttribute("serverPath", serverPath);    request.setAttribute("version", "3.1");    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1        response.setHeader("Pragma","no-cache"); //HTTP 1.0        response.setDateHeader ("Expires", 0); //prevents caching at the proxy server         response.setHeader("Pragma","No-cache");       response.setHeader("Cache-Control","no-cache");  %>