Home  >  Article  >  Java  >  Solution to garbled code in java jsp page

Solution to garbled code in java jsp page

尚
Original
2019-12-05 11:38:192382browse

Solution to garbled code in java jsp page

garbled characters appear on the jsp page: (Recommended: java video tutorial)

Question: Developers developing jsp should have good coding awareness, jsp The top should first clarify what the encoding is?

Solution: Add the following statement at the top of the page

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

Html Chinese garbled code:

Problem: The main reason for garbled code in htmll is that the Chinese text content in the html source code is inconsistent with Caused by different html encoding. The encoding of the web page is gbk, while the Chinese one is utf-8;

Solution: Add the following code to the top of the page93f0f5c25f18dab9d176bd4f6de5d30e......9c3bca370b5104690d9ef395f2c5f8d1

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

For more java knowledge, please pay attention to the java basic tutorial column.

The above is the detailed content of Solution to garbled code in java jsp page. 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