---
title: "解决Tomcat中文乱码问题"
author: "lanceverw"
date: "2010-12-01T11:20:32Z"
tags: []
categories: ["企业架构"]
slug: "tomcat"
draft: false
lastmod: "2010-12-01T14:56:13Z"
id: 830242
url: "https://lanceverw.iteye.com/blog/830242"
---

方法一:

   在页面中加入

   request.setCharacterEncoding("gb2312");

   此方法对于整个页面都有效。

 

 

方法二：

   对接收中文的对象进行转码：

  

```
String info = request.getParameter("info");
info = new String(info.getBytes("ISO-8859-1"));
```