重定向问题请各位进来看看!
Example3_13.jsp:
<%@ page contentType="text/html;charset=GB2312" %>
<HTML>
<BODY bgcolor=gray>
<P>填写姓名:<BR>
<FORM action="tree4.jsp" method="get" name=form>
<INPUT TYPE="text" name="boy">
<INPUT TYPE="submit" value="Enter">
</FORM>
</BODY>
</HTML>
tree4.jsp:
<%@ page contentType="text/html;charset=GB2312" %>
<HTML>
<BODY>
<% String str=null;
str=request.getParameter("boy");
if(str==null)
{str="";
}
byte b[]=str.getBytes("ISO-8859-1");
str=new String(b);
if(str.equals(""))
{ response.sendRedirect("Example3_13.jsp");
}
else
{out.print("欢迎您来到本网页!");
out.print("str");
}
%>
</BODY>
</HTML>
运行后得到下列错误:
有五处错误:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\Myfile\tree4_jsp.java:49: illegal character: \12288
?? { response.sendRedirect("Example3_13.jsp");
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\Myfile\tree4_jsp.java:50: illegal character: \12288
??}
^
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\Myfile\tree4_jsp.java:52: illegal character: \12288
??{out.print("娆㈣??ㄦ??版?缃?〉锛?");
^
请大家帮帮看看,谢谢!