Jpivot mdx查询编辑器输入中文乱码问题

使用jpivot mdx查询编辑器,输入带有中文的查询会返回乱码并报错。究其原因是页面request的content编码格式是iso-8859-1,要一劳永逸的解决此类问题,可以:

1.在web.xml下加入以下代码:

<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>com.tonbeller.wcf.charset.CharsetFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

2.修改testpage.jsp的两处charset=UTF-8

或者统一使用GBK

Tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *