日期:2014-05-17  浏览次数:20862 次

刚学jsp,Enumeration枚举为什么不能执行??
<%@ page language="java" contentType="text/html; charset=utf-8"
  pageEncoding="utf-8" import="java.util.Enumeration"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<br><br><br>
<p><font color="blue">
<div align="center">
用户信息
<br><br>
<table border="0">
<%
Enumeration e = request.getParameterNames();
if(e!=null){
while(e.hasMoreElements()){
String name = (String)e.nextElement();
String namezh = new String(name.getBytes("ISO8859-1"));
String value = (String)request.getParameter(name);
String valuezh = new String(value.getBytes("ISO8859-1"));
%>
<tr>
<td align="right">
<%=namezh%>
</td>
<td align="left">
<%=valuezh%>
</td>
</tr>
<tr></tr>
<%
}
}
%>
</table>
</div>
</font></p>
</body>
</html>

------解决方案--------------------
没看出来哪不行啊 怎么不行了LZ