访问前台页面${pageContext.request.contextPath}/el表达式失效问题解决

最近在做项目整合这个问题,然后在项目整合的时候,遇到了好多问题,这是其中一个,在此留作记录吧,虽然关键点不是我处理好的。


访问前端页面,我先描述一下具体出现的现象:我访问前端jsp页面的时候,jquery文件,js,css样式等都会失效,也就是没有引入到jsp页面当中。

查看浏览器console的时候,发现${pageContextrequest.contextPath}并没有生效,而是现实${^&^%Sd}一对乱码在里面


首先分析一下,前台页面报404这个问题,肯定是路径有问题,但是如果你的文件代码是原模原样的copy过来的话,就又会有疑问了,同时也就排除了代码错误的查询点。

然后我再网上查询了一番,有叫输出一下<% =request.getContextPath();%>的,还有的叫在page上面加上:<%@ page isELIgnored="false" %>

后面的这招确实很管用,但是如果页面引用的文件很多的话,就不能通过这种方法根本性的解决问题。


然后我找到了一篇文章上面说出了:引入el表达式失效的问题,我觉得这个说的是我的问题的关键点

el表达式失效,导致$符号不起作用才会出现上面的这种情况,具体的解决办法:

那篇文章上面说:是因为web.xml文件中的标头版本不对

2.3.xsd中默认的isELIgnored=“”“true”  以上版本就不会出现这种问题


我的是因为web.xml文件标头文件不对,我重新在原来的项目中拷贝了一下,调整了一下冲突,就ok了

我觉得如果我不贴出webxml的标头,还是有人会去搜一下,可能又是麻烦什么的一大堆了

<?xml version="1.0 encoding="UTF-8"?>

<web-app xmls:xsi="http"//www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

version="3.0">


下面这个是我借鉴的这篇文章

把web.xml  中Web-App版本修改到2.4

 

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"  
  2.    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"  
  3.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">  
  5. 修改后的Web.xml...Web-App  
  6. <web-app xmlns="http://java.sun.com/xml/ns/j2ee"  
  7.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    
  8.    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"  
  9.    version="2.4">     

为什么要修改,原因是jboss-4.0.5太低了....如果是jboss-4.2.5.就不用修改.

 

以下是网上找到的.只试了修改Web.xml.成功了.

 

Tomcat 5.5使EL表达式不被解析。

 

现象

代码${userSession.user_name}是JSP中的一个代码片段;

如果部署到tomcat5.5中,不会显示出session中的变量user用户名,而只会把 ${userSession.user_name}打印出来,猜测很可能是tomcat5.5的bug,不解析(或屏蔽了)EL表达式。

 原因

如果web.xml中声明部分的schema版本为2.5或者以上,而tomcat使用的是5.5.x以下的版本的时候就会出现在页面直接显示而不解析jstl/el表达式。如果web.xml中声明部分的schema版本为2.5或者以上,tomcat使用使用的是6.0以上则不出现这种问题。

 解决方案

(1)升级tomcat容器至tomcat6(推荐方法)。

(2)修改web.xml中声明部分的schema版本为2.4  (已验证,果然可以~)。

(3)在使用了EL表达式的所有JSP页面的中加入page指令添加 isELIgnored="false",

       形如:<%@ page    isELIgnored="false"  %>(比较麻烦)。

-----------------------------------------------------------------------------------------

jsp头一定要加上isELIgnored="false",否el会不被执行。

如:

<%@ page language="Java" contentType="text/JavaScript; charset=UTF-8" 

        isELIgnored="false" buffer="24kb" pageEncoding="UTF-8"%>

  好久没用EL表达式了。由于以前做项目都是用struts2的标签。最近做一个项目用公司以前的老项目的框架。所以用的就是struts1.而struts1的标签我一个都不会。只好决定用JSTL标签。取值就只能用EL表达式了。

 -----------------------------------------------------------------------------------------

原因是JSp页面的isELIgnored值不知道被谁给改了。

 解决办法:1,在JSP页面上面加上<%@ page isELIgnored="false"%>

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

 C标签有两种加载方式1:<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

                             2:<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

 这里必须用第二种才能解析。

 -----------------------------------------------------------------------------------------

今天也碰到el表达式无法解析的事情,于是在网上查询了下,盗取了一篇,说的挺详细的! 

web.xml声明部分一般分为如下版本的xsd, 

web-app_2_2.xsd 

web-app_2_3.xsd 

web-app_2_4.xsd 

web-app_2_5.xsd 

 

更详细的列出各版本web.xml声明部分吧,如下: 

[html]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. web-app_2_2.xsd   
  2. <?xml version="1.0" encoding="UTF-8"?>     
  3. <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/dtd/web-app_2_2.dtd">     
  4.    
  5. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/dtd/web-app_2_2.dtd">   
  6.    
  7. web-app_2_3.xsd   
  8. <?xml version="1.0" encoding="UTF-8"?>     
  9. <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">     
  10.    
  11. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">   
  12.    
  13. web-app_2_4.xsd   
  14. <?xml version="1.0" encoding="UTF-8"?>     
  15. <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">     
  16.    
  17. <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">   
  18.    
  19. web-app_2_5.xsd   
  20. <?xml version="1.0" encoding="UTF-8"?>     
  21. <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">     
  22.    
  23. <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">   

 

 

确定web.xml里的xsd版本之后一定要在JSP的声明(<%@page %>)部分加一行,如下: 

<%@ page isELIgnored="false" %> 

这样设为false才能解析EL表达式。 

经过各版本的test之后.... 

注意!! 其中servlets 2.4(我没记错的话JSP 2.0出来之后的第一个版本),这个版本的isELIgnored默认设置为false。所以使用web.xml里用web-app_2_4.xsd声明的时候在JSP页面不用特意声明。

 

 

------------------------------------------------------------

原因:问题在web.xml配置文件上,web.xml声明部分一般分为如下版本的xsd, 

         web-app_2_2.xsd 

         web-app_2_3.xsd 

         web-app_2_4.xsd 

         web-app_2_5.xsd 

         具体声明代码就不列出,网上可以找到,查找以前项目的web.xml文件也可以。 在jsp页面的<%@ page isELIgnored="false" %>声明中,将isELIgnored属性设为false,EL表达 式才可以正常显示,在2.4版本之前的版本,isELIgnored默认为true,所以只能在JSP页面设置这个属性为false才可以。2.4版本中isELIgnored属性默认为false,因此EL表达式可以直接使用。 

 

方法:1.JSP页面中<%@ page isELIgnored="false" %>,每个页面都如此,就会很麻烦。 

         2.将web.xml中的声明改为2.4版本,如下: 

<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd"> 

 

下面是官方Documention中isELIgnored Attribute的详解: 

The isELIgnored Attribute 

• Format 

– <%@ page isELIgnored="false" %> 

– <%@ page isELIgnored="true" %> 

Purpose 

– To control whether the JSP 2.0 Expression Language 

(EL) is ignored (true) or evaluated normally (false). 

• Notes 

– If your web.xml specifies servlets 2.3 (corresponding to 

JSP 1.2) or earlier, the default is true 

• But it is still legal to change the default—you are permitted 

to use this attribute in a JSP-2.0-compliant server 

regardless of the web.xml version. 

– If your web.xml specifies servlets 2.4 (corresponding to 

JSP 2.0) or earlier, the default is false 

 

PS: 我本来的版本是2.5,以前也没出过此类问题,感觉可能是Tomcat的版本不一样造成的问题,在Tomcat中的web.xml中貌似也有可以配置EL可用的定义。这种小问题虽然不起眼,但写程序时感觉还是很容易遇到的,而且只有在亲自写代码时才会碰到,书上是找不到的,所以积少成多,也许这就是经验积累的过程吧! 

 

PS: 2.5版本的也是默认true,要在每个使用EL表达式的JSP设定isELIgnored为false, 

另,引入JSTL可以在本地放置uri="/WEB-INF/c.tld"文件,也可以引入网上的解析文件uri="http://java.sun.com/jsp/jstl/core",同时别忘了需要2个jar包(jstl.jar和standard.jar)



http://hi.baidu.com/tylzyoudi/item/f690dc17d3d00f0fd1d66d68

.....

4
 

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <html> <head> <!-- 页面meta --> <meta charset="utf-8"> <title>书虫补给站</title> <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css"> <link rel="stylesheet" href="${pageContext.request.contextPath}/css/AdminLTE.css"> <link rel="stylesheet" href="${pageContext.request.contextPath}/css/_all-skins.min.css"> <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script> <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script> <script src="${pageContext.request.contextPath}/js/app.js"></script> <script type="text/javascript"> function SetIFrameHeight() { var iframeid = document.getElementById("iframe"); //iframe id if (document.getElementById) { iframeid.height = document.documentElement.clientHeight; } } </script> </head> <body class="hold-transition skin-purple sidebar-mini"> <div class="wrapper"> <!-- 页面头部 --> <header class="main-header"> <!-- Logo --> <a href="${pageContext.request.contextPath}/admin/index.jsp" class="logo"> <!-- mini logo for sidebar mini 50x50 pixels --> <span class="logo-mini"><b>智阅云联</b></span> <!-- logo for regular state and mobile devices --> <span class="logo-lg"><b>书虫补给站</b></span> </a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top"> <nav class="navbar navbar-static-top"> <div class="navbar-custom-menu"> <ul class="nav navbar-nav"> <li class="dropdown user user-menu"> <a > <img src="${pageContext.request.contextPath}/img/user1.jpg" class="user-image" alt="User Image"> <span class="hidden-xs">${USER_SESSION.name}</span> </a> </li> <li class="dropdown user user-menu"> <a href="${pageContext.request.contextPath}/userServlet?method=logout"> <span class="hidden-xs">注销用户</span> </a> </li> </ul> </div> </nav> </nav> </header> <!-- 页面头部 /--> <!-- 导航侧栏 --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- /.search form --> <!-- sidebar menu: : style can be found in sidebar.less --> <ul class="sidebar-menu"> <li id="admin-index"> <a href="${pageContext.request.contextPath}/admin/index.jsp"> <i class="fa fa-dashboard"></i> <span><b>新书推荐</b></span> </a> </li> <li> <a href="${pageContext.request.contextPath}/bookServlet?method=search" target="iframe"> <i class="fa fa-circle-o"></i> <span><b>图书借阅</b></span> </a> </li> <li> <a href="${pageContext.request.contextPath}/bookServlet?method=searchBorrowed" target="iframe"> <i class="fa fa-circle-o"></i> <span><b>当前借阅</b></span> </a> </li> <li> <a href="${pageContext.request.contextPath}/recordServlet?method=searchRecords" target="iframe"> <i class="fa fa-circle-o"></i> <span><b>借阅记录</b></span> </a> </li> </ul> </section> <!-- /.sidebar --> </aside> <!-- 导航侧栏 /--> <!-- 内容区域 --> <div class="content-wrapper"> <iframe width="100%" id="iframe" name="iframe" onload="SetIFrameHeight()" frameborder="0" src="${pageContext.request.contextPath}/bookServlet?method=selectNewbooks"></iframe> </div> </div> </body> </html>帮我优化一下这段代码
06-19
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ page import="javax.servlet.*,java.text.*" %> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="renderer" content="webkit"> <title>收入综合分析平台</title> <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/bootstrap-3.3.7-dist/css/bootstrap.min.css"> <%-- 右击菜单样式 --%> <link href="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/css/jquery.contextMenu.min.css" rel="stylesheet"/> <%-- <link href="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/css/animate.min.css" rel="stylesheet"/>--%> <link href="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/css/style.min.css" rel="stylesheet"/> <link href="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/css/skins.css" rel="stylesheet"/> <link href="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/css/ry-ui.css?v=4.6.1" rel="stylesheet"/> <%-- 图标库 --%> <link href="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/css/font-awesome.min.css" rel="stylesheet"/> <script src="${pageContext.request.contextPath}/resources/js/jquery-1.11.3.min.js?v=<%=System.currentTimeMillis()%>"></script> <script src="${pageContext.request.contextPath}/resources/bootstrap-3.3.7-dist/js/bootstrap.min.js?v=<%=System.currentTimeMillis()%>"></script> <script src="${pageContext.request.contextPath}/resources/global/global.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript"> $(function(){ $.ajax({ type: 'get', url: "dic/getUrlByUser", async: false, dataType: 'json', success: function (data) {//返回list数据并循环获取 var ht = ""; var arr = ['desktop','calculator','leanpub','map','send','bar-chart','line-chart','train','american-sign-language-interpreting','gears','user-circle-o','paper-plane','firefox']; for(var i=0;i<data.length;i++){ //循环一级菜单 ht = ht +'<li>'+ '<a href="#">' + '<i class="fa fa-'+arr[i]+'"></i> ' + '<span class="nav-label">'+data[i].mkName+'</span>' + '<span class="fa arrow"></span>' + '</a>'+ '<ul class="nav nav-second-level collapse">'; var obj = data[i].obj; if(obj[0].cdlb == ""){//该模块不存在二级菜单 for(var j=0;j<obj.length;j++){ ht = ht + '<li>\n' + '<a class="menuItem" href="'+obj[j].cdUrl+'">'+ obj[j].cdName +'</a>' + '</li>'; } ht = ht + '</ul></li>'; }else{ var cdlbArr = new Array(); for(var j=0;j<obj.length;j++){ cdlbArr.push(obj[j].cdlb); } cdlbArr = uniqueArr(cdlbArr); for(var k=0;k<cdlbArr.length;k++){ ht = ht + '<li>\n' + '<a href="#"><i class="fa fa-pied-piper"></i> '+cdlbArr[k]+'<span class="fa arrow"></span></a>\n' + '<ul class="nav nav-third-level collapse">'; for(var m=0;m<obj.length;m++){ if(cdlbArr[k] == obj[m].cdlb){ ht = ht + '<li>\n' + '<a class="menuItem" href="'+obj[m].cdUrl+'">'+ obj[m].cdName +'</a>' + '</li>'; } } ht = ht + '</ul></li>'; } } ht = ht + '</ul></li>'; } $("#side-menu").append(ht); } }); }) /* * 用于解决浏览器关闭后Cookie未失效,攻击者可在用户关闭浏览器后,通过同一cookie直接访问网站(无需重新登录),窃取用户会话; * 由于ajax是异步 使用时会造成发送不过去的现象 需要使用同步请求 * 另外 如果只是使用 window.addEventListener('beforeunload'来判断 会出现 刷野也会消除session 所以只能通过一下方法来实现 * */ window.addEventListener('beforeunload', function(e) { // 获取导航类型(替代废弃的performance.navigation.type) console.log(JSON.stringify(performance.getEntriesByType("navigation")[0].toJSON().type)) const navType = performance.getEntriesByType("navigation")[0].toJSON().type; sendLogoutRequest(navType) // 排除刷新行为,仅在离开/关闭时触发逻辑 if (navType !== 'reload') { console.log('离开页面,执行逻辑') //sendLogoutRequest() return '111'; } }); /*class PageLeaveHandler { constructor() { this.isRefreshing = false; this.pendingUnload = false; this.pendingUnloadnum = 0;//默认值 this.init(); } init() { // 监听刷新快捷键 window.addEventListener('keydown', (e) => { if (e.key === 'F5' || (e.ctrlKey && e.key === 'F5')) { this.isRefreshing = true; } }); // 监听beforeunload事件 window.addEventListener('beforeunload', this.handleBeforeUnload.bind(this)); } handleBeforeUnload(e) { if (this.isRefreshing) { this.pendingUnload = false; return; } //sendLogoutRequest(this.isRefreshing) this.pendingUnload = true; return 1; } } new PageLeaveHandler();*/ function sendLogoutRequest(navType) { const logoutUrl = '${pageContext.request.contextPath}/sys/loginoutall?navType='+navType; if (navigator.sendBeacon) { navigator.sendBeacon(logoutUrl, 'loginoutall'); } else { const xhr = new XMLHttpRequest(); xhr.open('GET', logoutUrl, false); // 同步请求 xhr.timeout = 2000; try { xhr.send(); } catch (e) { // 忽略错误 } } } /*window.addEventListener('beforeunload', function(e) { // 取消事件的默认行为(部分浏览器需要) e.preventDefault(); if(!e.isTrusted){ // 2. 拼接正确的上下文路径(关键:避免404) const logoutUrl = '${pageContext.request.contextPath}/sys/loginoutall'; // 3. 用sendBeacon发送请求,浏览器会优先保证发送完成 if (navigator.sendBeacon) { navigator.sendBeacon(logoutUrl, 'loginoutall'); } else { const xhr = new XMLHttpRequest(); xhr.open('GET', logoutUrl, false); // 同步请求 xhr.timeout = 2000; try { xhr.send(); } catch (e) { } } } });*/ </script> </head> <body class="fixed-sidebar full-height-layout gray-bg skin-blue theme-light" style="overflow: hidden"> <div id="wrapper"> <!--左侧导航开始--> <nav class="navbar-default navbar-static-side" role="navigation"> <div class="nav-close"> <i class="fa fa-times-circle"></i> </div> <a href=""> <li class="logo hidden-xs"> <span class="logo-lg">欢迎${user.username}</span> </li> </a> <div class="sidebar-collapse"> <ul class="nav" id="side-menu"> <li> <div class="user-panel"> <%-- 该位置换谁个人中心地址 --%> <a class="menuItem noactive" title="个人中心" href=""> <div class="hide" text="个人中心"></div> <div class="pull-left image"> <%--<img src="resources/ruoyi/favicon.ico" class="img-circle" alt="User Image">--%> <img src="resources/image/eee.png" class="img-circle" alt="User Image"> </div> </a> <div class="pull-left info"> <%-- 该位置可以加上el表达式 然后读取成登录名即可 --%> <p></p> <a href="#"><i class="fa fa-circle text-success"></i> 在线</a> <%-- 该位置发起退出请求 换上即可 --%> <a href="sys/loginout" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i> 注销</a> </div> </div> </li> <li> <a class="menuItem" href="web/main/sy.jsp"><i class="fa fa-home"></i> <span class="nav-label">首页</span></a> </li> </ul> </div> </nav> <!--左侧导航结束--> <!--右侧部分开始--> <div id="page-wrapper" class="gray-bg dashbard-1"> <div class="row border-bottom"> <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0"> <div class="navbar-header"> <a class="navbar-minimalize minimalize-styl-2" style="color:#FFF;" href="#" title="收起菜单"> <i class="fa fa-bars"></i> </a> </div> <ul class="nav navbar-top-links navbar-right welcome-message"> <%--<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档" href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i> 文档</a></li> <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="#" id="lockScreen"><i class="fa fa-lock"></i> 锁屏</a></li>--%> <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="#" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏</a></li> <%--<li class="dropdown user-menu"> <a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown"> <img src="resources/image/eee.png" class="user-image"> <%– 该位置用el表达式读取登录名 –%> <span class="hidden-xs">海来怡天</span> </a> <ul class="dropdown-menu"> <li class="mt5"> <%– 该位置是个人中心超链接 –%> <a href="" class="menuItem noactive"> <i class="fa fa-user"></i> 个人中心</a> </li> <li> <a onclick="resetPwd()"> <i class="fa fa-key"></i> 修改密码</a> </li> <li> <a onclick="switchSkin()"> <%–<a id="btn" >–%> <i class="fa fa-dashboard"></i> 切换主题 </a> </li> <li class="divider"></li> <li> <%– 该位置是推出登录请求 –%> <a href=""> <i class="fa fa-sign-out"></i> 退出登录</a> </li> </ul> </li>--%> </ul> </nav> </div> <div class="row content-tabs"> <button class="roll-nav roll-left tabLeft"> <i class="fa fa-backward"></i> </button> <nav class="page-tabs menuTabs"> <div class="page-tabs-content"> <a href="javascript:" class="active menuTab" data-id="web/main/sy.jsp">首页</a> </div> </nav> <button class="roll-nav roll-right tabRight"> <i class="fa fa-forward"></i> </button> <a href="javascript:void(0);" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> 刷新</a> </div> <a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a> <div class="row mainContent" id="content-main" > <iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" data-id="web/main/sy.jsp" src="web/main/sy.jsp" frameborder="0" seamless></iframe> </div> </div> <!--右侧部分结束--> </div> <!-- 全局js --> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/js/plugins/metisMenu/jquery.metisMenu.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/js/plugins/slimscroll/jquery.slimscroll.min.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/js/jquery.contextMenu.min.js?v=<%=System.currentTimeMillis()%>"></script> <%--<script src="${pageContext.request.contextPath}/resources/ruoyi/ajax/libs/layui/layui.js?v=<%=System.currentTimeMillis()%>"></script>--%> <%-- 该方法用于将页面加载到本页面 --%> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/ajax/libs/blockUI/jquery.blockUI.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/ajax/libs/layer/layer.min.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/js/ry-ui.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/js/common.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/ruoyi/index.js?v=<%=System.currentTimeMillis()%>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/resources/ruoyi/ajax/libs/fullscreen/jquery.fullscreen.js?v=<%=System.currentTimeMillis()%>"></script> <script> /*window.history.forward(1); var ctx = "/zhfx"; // 皮肤缓存 var skin = storage.get("skin");*/ // history(表示去掉地址的#)否则地址以"#"形式展示 var mode = "history"; // 历史访问路径缓存 var historyPath = storage.get("historyPath"); // 是否页签与菜单联动 var isLinkage = true; /* * 这个js如果删了 按下F12编辑时 页面会不起作用 * */ $(function() { var lockPath = storage.get('lockPath'); if($.common.equals("history", mode) && window.performance.navigation.type == 1) { var url = storage.get('publicPath'); if ($.common.isNotEmpty(url)) { applyPath(url); } } else if($.common.isNotEmpty(lockPath)) { applyPath(lockPath); storage.remove('lockPath'); } else { var hash = location.hash; if ($.common.isNotEmpty(hash)) { var url = hash.substring(1, hash.length); applyPath(url); } else { if($.common.equals("history", mode)) { storage.set('publicPath', ""); } } } $("[data-toggle='tooltip']").tooltip(); }); </script> </body> </html> 为什么 一个刷新 一个跳转 这俩 点刷新是reload 再点跳转还是reload 必须第二下才是navigate 但是这样点了navigate之后 再点刷新还是navigate 必须再点刷新才是reload 这可不能这样
最新发布
11-12
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值