简单基础路径配置(单用JSP)EASYUI
Posted 决心觉新
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了简单基础路径配置(单用JSP)EASYUI相关的知识,希望对你有一定的参考价值。
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@page isELIgnored="false"%> <% String path=request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; // System.out.println(basePath); %> <head> <meta charset="UTF-8"> <base href="<%=basePath%>"></base> <%-- <c:set var="ctxt" value="${pagecontext.request.contextpath}"></c:set> --%> <link id="easyuiTheme" rel="stylesheet" type="text/css" href="<%=basePath%>/frame/comp/easyui/themes/default/easyui.css" /> <script type="text/javascript" src="<%=basePath%>/frame/comp/easyui/jquery.min.js"></script> <script type="text/javascript" src="<%=basePath%>/frame/comp/easyui/jquery.easyui.min.js"></script> <script type="text/javascript"> if (!localStorage.getItem("accessToken")) {//?¤????è·¨??????é??é¢? if (getQueryString(‘accessToken‘)) { localStorage.accessToken = getQueryString(‘accessToken‘); } } $.ajaxSetup({ data : { "accessToken" : localStorage.getItem("accessToken") == null ? "" : localStorage.getItem("accessToken") } }); function getQueryString(name) {//è?·???èˉ·?±??????° var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } </script>
以上是关于简单基础路径配置(单用JSP)EASYUI的主要内容,如果未能解决你的问题,请参考以下文章