javaEE项目中常用的包含上下文路径的代码

来源:互联网 发布:c语言input是什么意思 编辑:程序博客网 时间:2024/05/18 05:22
<%@page import="java.util.regex.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %><%@page import="com.uudev.framework.util.LoggerUtils" %><%@page import="com.uudev.framework.util.Utils" %><%    //设置contextPath上下文路径    String contextPath = Utils.getContextPath(request);//LoggerUtils.getLogger().warn("contextPath="+contextPath);    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + contextPath + "/";    request.setAttribute("contextPath", contextPath);%><script>    contextPath = '<%=contextPath %>';    jsessionid = '<%=request.getSession().getId() %>';</script>
0 0
原创粉丝点击