我把它改成下面的 <FONT COLOR = RED> <!--取得yourName控制项的传出值--> <% string str=request.getParameter("yourName"); out.println(str); %></FONT> 错现了这样的错误:type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: -1 in the jsp file: nullGenerated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] E:\tomcat-5\work\Catalina\localhost\_\Response_jsp.java:59: cannot resolve symbol [javac] symbol : class string [javac] location: class org.apache.jsp.Response_jsp [javac] string str=request.getParameter("yourName"); [javac] ^ [javac] 1 error真是郁闷啊,请帮忙。
改为:
byte b[]=str.getBytes("ISO8859_1");
干嘛?
我看很多书上都是这样写的byte b[]=str.getBytes("ISO-8859-1");
请问它和byte b[]=str.getBytes("ISO8859_1");
的区别是什么?
直接:
<% out.println(str);%>
就可以直接把接受的中文显示在网页上了.
<FONT COLOR = RED>
<!--取得yourName控制项的传出值-->
<% string str=request.getParameter("yourName");
out.println(str);
%></FONT>
错现了这样的错误:type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: -1 in the jsp file: nullGenerated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] E:\tomcat-5\work\Catalina\localhost\_\Response_jsp.java:59: cannot resolve symbol
[javac] symbol : class string
[javac] location: class org.apache.jsp.Response_jsp
[javac] string str=request.getParameter("yourName");
[javac] ^
[javac] 1 error真是郁闷啊,请帮忙。
应该是String ,"S"要大写的嘛!