群里高手请进
Example3_3.jsp的文件如下:<%@ page contentType="text/html;charset=gb2312"%>
<HTML>
<BODY BGCOLOR=GREEN><FONT SIZE=1>
<FORM ACTION="tree.jsp" METHOD=POST NAME=FORM>
<INPUT TYPE="text" NAME="boy">
<INPUT TYPE="submit" VALUE="提交" NAME="SUBMIT">
</FROM>
</FONT>
</BODY>
</HTML>
tree.jsp的文件如下:
<%@ page contentType="text/html;charset=gb2312" %>
<HTML>
<BODY>
<P>获取文本框提交的信息
<%
String textContent=request.getParameter("boy");
byte b[]=textContent.getBytes("ISO8859-1");
textContent=new String(b);
%>
<BR>
<%=textContent%>
<P>获取按钮的名字:
<%
String buttonName=request.getParameter("submit");
byte c[]=buttonName.getBytes("ISO-8859-1");
buttonName=new String(c);
%>
<BR>
<%=buttonName%>
</BODY>
</HTML>
运行时出现的异常:
org.apache.jasper.JasperException: An exception occurred processing JSP page /tree.jsp at line 15
12: <P>获取按钮的名字:
13: <%
14: String buttonName=request.getParameter("submit");
15: byte c[]=buttonName.getBytes("ISO-8859-1");
16: buttonName=new String(c);
17: %>
18: <BR>
请大虾尽快给小弟个解决问题的办法!无尽感激