1使用forward动作组件时的问题
<%@ page language="java" pageEncoding="GB2312"%>
<%@ page contentType = "text/html;charset=GB2312" %>
<html>
<head>
<title>forward</title>
</head>
<body>
<p>
<%double i = Math.random();
if(i>0.5){
%>
<jsp:forward page = "catalog1.html"></jsp:forward>
<%
}
else
{
%>
<jsp:forward page = "catalog2.html"></jsp:forward>
<%
}
%>
</body>
</html>
如果 <jsp:forward page = "catalog1.html"></jsp:forward>
写成不在一行的
<jsp:forward page = "catalog1.html">
</jsp:forward>
则出错。 为什么未知,在此记录。
原文:http://www.cnblogs.com/gnivor/p/4238467.html