fins,帮我一下

zhxp791008 2007-03-28
ECSIDE会判断请求的类型,如果请求的类型是AJAX请求,那么就使用UTF-8编码.
而如果您自己的编码过滤器没有进行这样的判断,那么就会引起乱码.

现在显示正常,修改双字符正常,单字符最后个乱码.
zhxp791008 2007-03-28
jdk1.4+weblogic8.1.5
jsp文件:
<%@ page language="java" contentType="text/html;charset=GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ page import="org.ecside.core.ECSideConstants"%>
<%@ taglib uri="http://www.extremecomponents.org" prefix="ec"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">

我项目中filter:
protected void process(HttpServletRequest p0, HttpServletResponse p1)
throws IOException, ServletException {
// TODO: Override this org.apache.struts.action.ActionServlet method
p0.setCharacterEncoding("GBK");
super.process(p0, p1);
}
自己的编码过滤器没有进行这样的判断
fins 2007-03-28
你web.xml怎么写的??
zhxp791008 2007-03-28
<filter>
  <filter-name>closeFilter</filter-name>
  <filter-class>migro.util.filter.CloseFilter</filter-class>
  </filter>
  <filter>
<filter-name>eXtremeExport</filter-name>
<filter-class>org.ecside.filter.ECSideFilter</filter-class>
<init-param> 
   <param-name>responseHeadersSetBeforeDoFilter</param-name> 
   <param-value>false</param-value> 
</init-param>
<init-param>
<param-name>useEasyDataAccess</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>useEncoding</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
</filter>

 
  <filter-mapping>
  <filter-name>closeFilter</filter-name>
  <url-pattern>/*</url-pattern>
  </filter-mapping>
 
<filter-mapping>
<filter-name>eXtremeExport</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Global site tag (gtag.js) - Google Analytics