jsp表单提交的中文全是乱码
都做到这样了呀,还是乱码,崩溃了<%@pagelanguage="java"pageEncoding="UTF-8"%><%@tagliburi="http://stru...
都做到这样了呀,还是乱码,崩溃了
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP for PersonForm form</title>
</head>
<body>
<%request.setCharacterEncoding("utf-8");
%>
<html:form action="/person" method="post">
name : <html:text property="name" value="王刚"/><html:errors property="name"/><br/>
<html:submit/><html:cancel/>
</html:form>
</body>
</html>
有的是MyEclipse+Struts1.2开发的 展开
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP for PersonForm form</title>
</head>
<body>
<%request.setCharacterEncoding("utf-8");
%>
<html:form action="/person" method="post">
name : <html:text property="name" value="王刚"/><html:errors property="name"/><br/>
<html:submit/><html:cancel/>
</html:form>
</body>
</html>
有的是MyEclipse+Struts1.2开发的 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询