网上都说在jsp页面加上<%@ page isELIgnored="false"%>就支持el表达式了为什么我的必须设置成<%@ page isELIgnored="true"%>才支持

解决方案 »

  1.   

    <%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
    <%@ page isELIgnored="false" %> 
    <%@ taglib uri="/security" prefix="security"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <%
        String path = request.getContextPath();
    response.setHeader("Cache-Control", "no-cache");
    //Forces caches to obtain a new copy of the page from the origin server 
    response.setHeader("Cache-Control", "no-store");
    //Directs caches not to store the page under any circumstance 
    response.setDateHeader("Expires", 0);
    //Causes the proxy cache to see the page as "stale" 
    response.setHeader("Pragma", "no-cache");
    //HTTP 1.0 backward compatibility
    request.setAttribute("path",path);
    %>
    <title>导航菜单</title>
    <meta http-equiv="Content-Type" content="text/html" ; charset="gb2312">
    <link href="css/default.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript"
    src="js/showLeft.js"></script>
    </head>
    <body class="left_body_20070514">
    <!--  
    img id --  changeMenu --  id
    --> <div class="left_title">
    用户:
    ${ userinfo.accountno}
    </div>
        <c:forEach items="${menulist}" var="tmp" varStatus="varsta">
         <security:restrictField ruleCode="${tmp[0]}">
        <c:if test="${tmp[4]=='M' }">
         <c:if test="${varsta.count !=1}">
    </ul>
    </div>
    </c:if>
        <div class="left_title" onClick="changeMenu('Menu${varsta.count }')" style="cursor:pointer;">
     <img id='imgMenu${varsta.count }' src="images/LedOff.ico" /> &nbsp;&nbsp;${tmp[1] }
    </div>
    <div class="left_txt" id="divMenu${varsta.count }" style="display:none">
    <ul class="c">
        </c:if>
        <c:if test="${tmp[4]!='M'}">
        <li >
    <a href='${tmp[7] }' target='right'>
    <img src="images/16.gif"/><br>${tmp[1] }</a>
    </li>
        </c:if></security:restrictField>
        </c:forEach>
        <c:if test="${countsize!=0}">
    </ul>
    </div></c:if>

    <div class="left_title" onClick="quitsys('<%=request.getServerName() +":"+ request.getServerPort()+path %>')"
    style="cursor:pointer">

    &nbsp;&nbsp;退出系统
    </div>
    我的是false