Try to fix encoding issue on post.

This commit is contained in:
Paulo Gustavo Veiga 2013-03-07 23:46:07 -03:00
parent ef3e8ae772
commit 52efdf729b
3 changed files with 14 additions and 12 deletions

View File

@ -102,7 +102,7 @@ mindplot.RESTPersistenceManager = new Class({
persistence.onSave = false; persistence.onSave = false;
}, },
headers:{"Content-Type":"application/json", "Accept":"application/json"}, headers:{"Content-Type":"application/json; charset=utf-8", "Accept":"application/json"},
emulation:false, emulation:false,
urlEncoded:false urlEncoded:false
}); });
@ -121,7 +121,7 @@ mindplot.RESTPersistenceManager = new Class({
}, },
onFailure:function () { onFailure:function () {
}, },
headers:{"Content-Type":"application/json", "Accept":"application/json"}, headers:{"Content-Type":"application/json; charset=utf-8", "Accept":"application/json"},
emulation:false, emulation:false,
urlEncoded:false urlEncoded:false
}); });

View File

@ -5,7 +5,17 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4"> version="2.4">
<filter>
<filter-name>charsetFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<distributable/> <distributable/>
<context-param> <context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>messages</param-value> <param-value>messages</param-value>
@ -38,15 +48,6 @@
<listener-class>com.wisemapping.service.HibernateAppListener</listener-class> <listener-class>com.wisemapping.service.HibernateAppListener</listener-class>
</listener> </listener>
<filter>
<filter-name>charsetFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter> <filter>
<filter-name>hibernate</filter-name> <filter-name>hibernate</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>

View File

@ -1,6 +1,6 @@
<%@ page import="com.wisemapping.security.Utils" %> <%@ page import="com.wisemapping.security.Utils" %>
<%@ page import="com.wisemapping.model.User" %> <%@ page import="com.wisemapping.model.User" %>
<%@page pageEncoding="UTF-8" %> <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsp/init.jsp" %> <%@ include file="/jsp/init.jsp" %>
<!DOCTYPE HTML> <!DOCTYPE HTML>
@ -11,6 +11,7 @@
<%--@elvariable id="lockInfo" type="com.wisemapping.service.LockInfo"--%> <%--@elvariable id="lockInfo" type="com.wisemapping.service.LockInfo"--%>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<base href="${requestScope['site.baseurl']}/"> <base href="${requestScope['site.baseurl']}/">
<title><spring:message code="SITE.TITLE"/> - <c:out value="${mindmap.title}"/></title> <title><spring:message code="SITE.TITLE"/> - <c:out value="${mindmap.title}"/></title>
<!--[if lt IE 9]> <!--[if lt IE 9]>