SSH中JSP不支持EL表达式吗。。。很奇怪
是说怎么了,娶不到数据,光棍!!!!
我就随便测试下,结果
看下面JSP页面
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP '11.jsp' starting page</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"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> This is my JSP page. ${path}<br/>${basePath } <c:out value="${basePath}"></c:out><br/> <%=basePath %> <br/>是:${basePath } </body></html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
<%
List list=new ArrayList();
list.add(1);
list.add(2);
list.add(3);
request.setAttribute("list",list);
%>
<c:forEach items="${list}" var="p">${p}</c:forEach>
</body>
</html>
看看能不能打印