An error occurred at line: 15 in the jsp file: /params.jsp Enumeration cannot be resolved to a type 5
以下是我的代码:<%@pagecontentType="text/html;charset=utf-8"%><%@pageimport="java.until.*"%><...
以下是我的代码:
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.until.*" %>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<%
String current_param="";
request.setCharacterEncoding("GBK");
Enumeration params=request.getParameterNames();
while(params.hasMoreElements()){
current_param=(String)params.nextElement();
out.println("Name:"+current_param+"<br>");
out.println("Values:"+request.getParameter(current_param)+"<br>");
}
%>
</body>
</html>
不好意思,<%@ page import="java.until.*" %>
把until改成util就好了 展开
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.until.*" %>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<%
String current_param="";
request.setCharacterEncoding("GBK");
Enumeration params=request.getParameterNames();
while(params.hasMoreElements()){
current_param=(String)params.nextElement();
out.println("Name:"+current_param+"<br>");
out.println("Values:"+request.getParameter(current_param)+"<br>");
}
%>
</body>
</html>
不好意思,<%@ page import="java.until.*" %>
把until改成util就好了 展开
2个回答
2011-04-16
展开全部
导入import java.util.Enumeration;
import java.util.Hashtable;试下
import java.util.Hashtable;试下
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询