我正在尝试使用spring MVC插入阿拉伯语/印地语语言字符。 示例数据:عينة我试图添加。但是从jsp谈到我的控制器它看起来像:'عÙ?Ù?Ø©'。
同样反映在数据库中。
我的jsp如下:
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%><%@ page import = "java.util.ResourceBundle" %>
<%
ResourceBundle resource = ResourceBundle.getBundle("resources/web");
String UI_PATH=resource.getString("lugmaUiPath");
String title=resource.getString("dashboardTitle");
String dashboardURL=resource.getString("dashboardURL");
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Lugma - Employee List</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no" />
<meta content="A fully featured admin theme which can be used to build
CRM, CMS, etc." name="description" />
<meta content="Coderthemes" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<form method="POST" action="new_add">
<input type="text" name="arabic_name" id="arabic_name" >
</form>
我的控制器代码如下:
@RequestMapping(value="/new_add",method = RequestMethod.POST)
public ModelAndView employee_new_post(employeeBean
employeeBean,HttpServletRequest request, HttpServletResponse
response){
ModelAndView model= null;
system.out.println(""+employeeBean.getArabic_name)
return model;
}