请问在jsp页面中用了include()方法嵌套页面后怎么样才能在嵌套的页面中是用ArrayList对象?

来源:百度知道 编辑:UC知道 时间:2024/05/27 15:35:50
我是做了两个jsp页面(jsp1,jsp2), 在jsp1中以导入了ArrayList包,
我想通过由jsp1转到一个servlet中在由那个servlet传到jsp2中请问
怎样将jsp2嵌套入jsp1怎么样才能在jsp2页面中使用ArrayList对象呢?

为什么我在jsp2页面中也导入个ArrayList包一运行就要抱错呢...不懂..........................
但是必须要在jsp1,jsp2两个页面中都要使用ArrayList包

jsp1.jsp代码如下
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>

<!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&quo