in the JSP file. The second method: MyEclipse changes the default encoding of jsp."/> in the JSP file. The second method: MyEclipse changes the default encoding of jsp.">

Home  >  Article  >  Java  >  How to set utf-8 in jsp

How to set utf-8 in jsp

(*-*)浩
(*-*)浩Original
2019-05-20 14:25:518125browse

This article will introduce several aspects of setting UTF-8. I hope it will be helpful to everyone.

How to set utf-8 in jsp

The first method:

Write in the JSP file:


Second method:

MyEclipse changes the default encoding of jsp

In normal times, when we create a new JSP page, the default encoding is "ISO8859-1". So how can we make it default to Chinese encoding without having to manually modify pageEncoding="GBK" every time. At this time we can select the menu item under MyEclipse6.5:

Windows---->Preferences---->myeclipse Enterprise Workbench---->File and Editors---- ->JSP--->Select the Encoding in this directory as the encoding you want to set (such as UTF-8, Chinese, National Standard and other encoding methods)

How to set utf-8 in jspAfter setting like this, you The next time you create a new JSP page, it will default to the encoding you set.

The above is the detailed content of How to set utf-8 in jsp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn