From 52efdf729bc2843627511ea343b50f2bdd93d3c8 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 7 Mar 2013 23:46:07 -0300 Subject: [PATCH] Try to fix encoding issue on post. --- .../main/javascript/RestPersistenceManager.js | 4 ++-- wise-webapp/src/main/webapp/WEB-INF/web.xml | 19 ++++++++++--------- .../src/main/webapp/jsp/mindmapEditor.jsp | 3 ++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/mindplot/src/main/javascript/RestPersistenceManager.js b/mindplot/src/main/javascript/RestPersistenceManager.js index f7c284da..9a6228a1 100644 --- a/mindplot/src/main/javascript/RestPersistenceManager.js +++ b/mindplot/src/main/javascript/RestPersistenceManager.js @@ -102,7 +102,7 @@ mindplot.RESTPersistenceManager = new Class({ persistence.onSave = false; }, - headers:{"Content-Type":"application/json", "Accept":"application/json"}, + headers:{"Content-Type":"application/json; charset=utf-8", "Accept":"application/json"}, emulation:false, urlEncoded:false }); @@ -121,7 +121,7 @@ mindplot.RESTPersistenceManager = new Class({ }, onFailure:function () { }, - headers:{"Content-Type":"application/json", "Accept":"application/json"}, + headers:{"Content-Type":"application/json; charset=utf-8", "Accept":"application/json"}, emulation:false, urlEncoded:false }); diff --git a/wise-webapp/src/main/webapp/WEB-INF/web.xml b/wise-webapp/src/main/webapp/WEB-INF/web.xml index c8182dc3..1bc58ccb 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/web.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/web.xml @@ -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" version="2.4"> + + charsetFilter + org.springframework.web.filter.CharacterEncodingFilter + + encoding + UTF-8 + + + + javax.servlet.jsp.jstl.fmt.localizationContext messages @@ -38,15 +48,6 @@ com.wisemapping.service.HibernateAppListener - - charsetFilter - org.springframework.web.filter.CharacterEncodingFilter - - encoding - UTF-8 - - - hibernate org.springframework.orm.hibernate3.support.OpenSessionInViewFilter diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp index 0af64869..e9c1ff36 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp @@ -1,6 +1,6 @@ <%@ page import="com.wisemapping.security.Utils" %> <%@ 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" %> @@ -11,6 +11,7 @@ <%--@elvariable id="lockInfo" type="com.wisemapping.service.LockInfo"--%> + <spring:message code="SITE.TITLE"/> - <c:out value="${mindmap.title}"/>