JSP标签的字符集 [英] Charset of JSP tags

查看:78
本文介绍了JSP标签的字符集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于JSP标记的字符集的简单问题。

Simple question about charset of JSP tags.

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib  tagdir="/WEB-INF/tags" prefix="custom" %>
<custom:mytag>  </custom:mytag>

mytag 位于 WEB-INF / tags 中的标签文件。 eclipse中这个文件的字符集是UTF-8。由于某些原因,UTF-8符号无法正确显示。

mytag is simple .tag file located in WEB-INF/tags. Charset of this file in eclipse is UTF-8. For some reason UTF-8 symbols do not display properly.

这只会影响标签,包含的另一个jsp显示正确

This affect only including tags, another jsp-s that was included display fine

推荐答案

<%@ tag pageEncoding =UTF-8%> 将有所帮助。

标记指令属性与其 page

这篇关于JSP标签的字符集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆