大家帮我看看,可能是jsp:include的问题,急~~~~
ayace 2004-10-27 09:31:04 jsp文件:
test.jsp:
<%@ page contentType="text/html;charset=GB2312" %>
<HTML>
<BODY bgcolor=cyan><Font size=1 >
<P>您想使用什么方式查看文本文件A.txt?
<FORM action="tree3.jsp" method="post" name=form>
<INPUT TYPE="submit" value="word" name="submit1">
<INPUT TYPE="submit" value="excel" name="submit2">
</FORM>
</FONT>
</BODY>
</HTML>
tree3.jsp:
<%@ page contentType="text/html;charset=GB2312" %>
<HTML>
<BODY>
<% String str1=request.getParameter("submit1");
String str2=request.getParameter("submit2");
if(str1==null)
{str1="";
}
if(str2==null)
{str2="";
}
if(str1.startsWith("word"))
{response.setContentType("application/msword;charset=GB2312");
out.print(str1);
}
if(str2.startsWith("excel"))
{response.setContentType("application/x-msexcel;charset=GB2312");
}
%>
<jsp:include page="A.txt" flush="true">
</jsp:include>
</BODY>
</HTML>
用浏览test.jsp无问题,点按钮进入tree3.jsp,出现错误
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /tree3.jsp(20,0) Expected "param" tag with "name" and "value" attributes
........
后面还有很多,哪位达人教教我啊,谢谢,分不够我再加。