在1.jsp和2.jsp头部都加了
<%@ page contentType="text/html; charset=gb2312" %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
2.jsp
<%String str = new String(request.getParameter("name").getBytes("ISO8859_1"), "GB2312");%>
<%@ page contentType="text/html; charset=gb2312" %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
2.jsp
<%String str = new String(request.getParameter("name").getBytes("ISO8859_1"), "GB2312");%>
解决方案 »
- java 通过JCO 连接SAP 求jar包跟操作步骤 求大神
- url重写传参后servlet接收报错
- 【【如何获得tomcat中404错误的请求页链接???】】
- 请教,有用过jmesa的?进来一下!
- 运行tomcat,经常出现这样的错误,为什么
- Java的Timer定时执行问题
- 新手问个问题???
- (急)为何我的结果集一用last()或absolute()方法,系统提示java.sql.SQLException: 操作不允许: Unsupported syntax for refreshRow()。
- 在网页上如何提交大文本(超过32k)?
- 如何取得FORM里OPTION里的所有数值
- 给大家介绍个非常好的IDE:Eclipse
- 100分的初学问题
<%String str = new String(request.getParameter("name").getBytes("ISO8859_1"), "GB2312");%>
是一样的呀!
http://www.jspserver.com:8080/cgi-bin/jspbbs/topic.cgi?forum=3&topic=3&show=
<%@ page contentType="text/html;charset=gb2312"%>
和getBytes(..).
不成功呀!
String aa=new String(request.getParameter("bb").getBytes("8859_1"));
//我来了:)
temp_t=temp_t.getBytes("ISO8859-1");
String temp=new String(temp_t);
//ok了吗?
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page language="java" %>
<HTML>
<HEAD>
<TITLE>动态加载文件</TITLE>
</HEAD>
<BODY>
<CENTER>
<FONT SIZE = 10 COLOR = blue>动态加载文件</FONT>
</CENTER>
<br>
<HR>
<br>
<font size=5>
<!—用jsp:include指令动态加载文件 -->
<jsp:include page="jspInsert.jsp">
<jsp:param name="name" value="jsp:include"/>
<jsp:param name="file" value="jspInsert.jsp"/>
</jsp:include>
</font>
</BODY>
</HTML><HTML>
<BODY>
你好!这里我们用到了
<Font Color=Blue>
<%= request.getParameter("name")%>
</Font>
指令!
<BR>
我们在这里加载了文件:
<Font Color=Blue>
<%= request.getParameter("file")%>
</Font>﹝<br>
</HTML>
</BODY>