页面是这样地<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Test</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
</head>
<body>
欢迎您-------------- ${user.username }
</body>
</html>
可是为什么${user.username }取不到放到session中的值却显示为"${user.username }"
就算取不到,${user.username}显示为空的啊

解决方案 »

  1.   

    设置一下
    <%@ page isELIgnored="false"%>
      

  2.   

    <c:out value="${sessionScope.user.name}">或者 ${sessionScope.user.name}试试看。。
      

  3.   

    是EL引擎没有或没起作用。
    原因可能很多

    Tomcat版本低了,
    Web.xml中指定的Web应用版本低了,
    配置关掉了EL解析,
    等等
      

  4.   


    Web.xml中指定的Web应用版本低了  正解
    谢了。。从来没遇到这样
      

  5.   

    是EL引擎没有或没起作用。
    Web.xml中指定的Web应用版本低
    配置关掉了EL解析