鉴于我的项目中我的 JSP 文件的以下预览:
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="beans.UserBean"%>
<jsp:useBean id="userBean" class="beans.UserBean" scope="session" />
<jsp:useBean id="students" type="ArrayList<beans.UserBean>" scope="session" />
<jsp:useBean id="teachers" type="ArrayList<beans.UserBean>" scope="session" />
<!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>
我在 Eclipse 中收到以下错误:
Undefined type: ArrayList
它出什么问题了 ?即使我正在导入ArrayList
,Eclipse 也无法识别它,并在以下两行中显示上述消息:
<jsp:useBean id="students" type="ArrayList<beans.UserBean>" scope="session" />
<jsp:useBean id="teachers" type="ArrayList<beans.UserBean>" scope="session" />
知道我哪里出错了吗?谢谢