Home  >  Q&A  >  body text

java - myeclipse中tomcat部署编译jsp页面后,浏览器显示中文乱码

阿神阿神2742 days ago825

reply all(8)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:34:14

    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.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:34:14

    Try setting the file encoding of IDE to utf8

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:34:14

    Look at the encoding of tomcat

    reply
    0
  • 迷茫

    迷茫2017-04-18 09:34:14

    <head>Add an encoding tag to the header:

    <meta charset="utf-8" />

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 09:34:14

    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

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 09:34:14

    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.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:34:14

    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

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:34:14

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

    reply
    0
  • Cancelreply