一个Spring的中文乱码的问题?
今天做了个程序,在表单里面进行提交,程序如下:
<%@page contentType="text/html;charset=GB2312" %>
<%request.setCharacterEncoding("GB2312");%>
<html>
<body>
<form name="deptaddform" method="post">
<p align="center"><span class="STYLE2">部门 ID</span>:
<spring:bind path="deptinfo.deptid">
<input name="deptid" type="text" class="STYLE2" size="15" value="${status.value}" />
</spring:bind>
<p align="center"><span class="STYLE2">部门编码</span>:
<spring:bind path ="deptinfo.deptcode">
<input name="deptcode" type="text" class="STYLE2" size="15" value="${status.value}"/>
</spring:bind>
<p align="center"><span class="STYLE2">部门名称</span>:
<spring:bind path="deptinfo.deptname">
<input name="deptname" type="text" class="STYLE2" size="15" value="${status.value}" />
</spring:bind>
<p align="center"><span class="STYLE2">部门领导</span>:
<spring:bind path="deptinfo.deptdirector">
<input name="deptdirector" type="text" class="STYLE2" size="15" value="${status.value}" />
</spring:bind>
<p align="center"><span class="STYLE2">部门职责</span>:
<spring:bind path="deptinfo.deptdesc">
<textarea name="deptdesc" cols="30" rows="3" class="STYLE2">${status.value}</textarea>
</spring:bind>
<p align="center">
<label>
<input name="Submit" type="submit" class="STYLE2" value="添加" />
</label>
<p align="center">
</form>
</body>
</html>
通过一个控制器进行解析!!但是在往数据库添加的过程当中出现了乱码!不知是什么原因!!!