java - myeclipse中tomcat部署编译jsp页面后,浏览器显示中文乱码
阿神
阿神 2017-04-18 09:32:14
0
8
817
阿神
阿神

闭关修行中......

reply all(8)
伊谢尔伦

I finally found the root of the problem. I'm using the myeclipse2016 version, so it's a problem with the IDE.

Just turn off the things like eyes in the picture above, and that’s it. If it still doesn't work, try a few more times.

左手右手慢动作

Try setting the file encoding of IDE to utf8

洪涛

Look at the encoding of tomcat

迷茫

<head>Add an encoding tag to the header:

<meta charset="utf-8" />
巴扎黑

Are you using the website opened by eclipse? Try using another browser. If you encounter garbled characters, manually set the encoding in the browser to UTF-8 and see if it displays correctly. Everything that needs to be changed has been changed, there should be no problem

大家讲道理

Myeclipse’s browser default encoding seems to be ISO-8859-1 or Spanish or something. I forgot the specifics. Setting the encoding by right-clicking on the browser can solve this problem. There is no need to bring your own browser, most other browsers can automatically recognize the encoding, so there should be no garbled characters.

Ty80

You don’t need to change the default encoding method of tomcat for your garbled code without passing parameters. As long as you set the encoding format of jsp, and then look at the encoding of your eclipse, your problem can basically be solved

Ty80

Try it with your own browser. Generally, as long as the jsp encoding format is set, there will be no problem

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!