Home > Java > Java Tutorial > body text

How to set utf-8 in jsp

(*-*)浩
Release: 2019-05-24 15:00:18
Original
7906 people have browsed it

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:

Copy after login

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!

Related labels:
jsp
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
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!