完整的获取当前jsp文件路径的语句 .

完整的获取当前jsp文件路径的语句



String realPath = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath()+request.getServletPath().substring(0,request.getServletPath().lastIndexOf("/")+1);

你可能感兴趣的:(jsp)