<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%><%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.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">
<script type="text/javascript" src="js/jquery-1.1.3.1.pack.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
<link rel="stylesheet" href="css/thickbox.css" type="text/css"></link>
<!--
-->
</head>
<body>
<form action="login.action?method=login" method="post">
<input type="text" name="username"/>用户名
<input type="password" name="userpassword"/>密码
<input type="submit" name="submit"/>
</form>
<%ArrayList<Integer> array = new ArrayList<Integer>();
for(int i = 0;i < 100;i++){
array.add(i);
}
request.setAttribute("array",array);
request.setAttribute("aa","aa");
%>
<c:forEach items="${array}" var="temp">
${temp}
</c:forEach>
</body>
<a href="success.jsp" title="" type="1" class="thickbox" >点击</a>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.io.*" pageEncoding="UTF-8"%%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'success.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">
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<link rel="stylesheet" href="css/centerthickbox.css" type="text/css"></link>
<script type="text/javascript" src="js/thickbox.js"></script>
<link rel="stylesheet" href="css/dialog.css" type="text/css"></link>
<script type="text/javascript" src="js/dialog.js"></script>
<link href="css/main.css" type="text/css" rel="stylesheet">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
<form action="" >
<input type="text" name="user"/>用户名
<input type="text" name="password"/>密码
</form>
<%
PrintWriter pw = new PrintWriter(response.getOutputStream());
String user = request.getParameter("user");
String password = request.getParameter("password");
if(user == null || password == null){
pw.write("无用户");
}else{
pw.write(user + password);
}
%>
</body>
</html>
并且在thickbox中显示第2个HTML的信息,总是不行