I want to send parameter in variable mois :"Février" , the problem is when i sent the parameter which it contain accent like é , i get other value in class java by @ResponseBody: Février my url is : http://othman-pc.com:8080/COSUMAR_WebAdmin/moisTest.html?mois=Février
the probléme is thas in console java : System.out.println("Mois :"+ mois);
i Get :
Mois :Février
Getjson :
$.getJSON("moisTest.html", {mois: $(this).val()}, function(j) { if (j === false) { alert("good") });
Spring @ResponseBody
@RequestMapping(value = "/moisTest.html",method = RequestMethod.GET)
public @ResponseBody String moisTest(@RequestParam(value ="mois") String mois){
System.out.println("Mois :"+ mois);
return "false";}
my JSP :
<%@ page contentType="text/html; charset=ISO-8859-1" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Headers statue:
Request URL:http://localhost:8080/COSUMAR_WebAdmin/moisTest.html?mois=F%C3%A9vrier
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*
Accept-Encoding:gzip,deflate,sdch
Accept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4,ar;q=0.2
Cache-Control:max-age=0
Connection:keep-alive
Content-Type:application/x-www-form-urlencoded
Cookie:JSESSIONID=zMFHDOspJtUYA+Eg4hidb+C1.undefined; ASP.NET_SessionId=ohyxckjs40vkg121wnnvygwn; fcspersistslider2=1; submenuheader=0c; PHPSESSID=vak58e1nha6mg51prp4ke0l3f3; JSESSIONID=29a2a59a435d5e9fe335568f602d; treeForm_tree-hi=treeForm:tree:resources:JDBC:connectionPoolResources:evpsPool
Host:localhost:8080
Referer:http://localhost:8080/COSUMAR_WebAdmin/upload.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
X-Requested-With:XMLHttpRequest
Query String Parametersview sourceview URL encoded
mois:Février
Response Headersview source
Cache-Control:no-cache
Cache-Control:no-store
Content-Length:5
Content-Type:application/json
Date:Sat, 01 Mar 2014 15:08:05 GMT
Expires:Thu, 01 Jan 1970 00:00:00 GMT
Pragma:no-cache
Server:Apache-Coyote/1.1