页面是这样地<%@ 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}显示为空的啊
<%@ 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}显示为空的啊
<%@ page isELIgnored="false"%>
原因可能很多
如
Tomcat版本低了,
Web.xml中指定的Web应用版本低了,
配置关掉了EL解析,
等等
Web.xml中指定的Web应用版本低了 正解
谢了。。从来没遇到这样
Web.xml中指定的Web应用版本低
配置关掉了EL解析