I18n JSTL - 特殊字符错误

时间:2015-05-06 12:20:52

标签: java jsp jstl vraptor

带有重音符号的单词出现的方式错误。一个例子是“Sugestões”这个词在屏幕上显示“Sugest�es”。

Web.xml中

<?xml version="1.0" encoding="UTF-8"?>

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd”     id =“proj”version =“2.5”&gt;     PROJ

<context-param>
    <param-name>
      javax.servlet.jsp.jstl.fmt.localizationContext
    </param-name>
    <param-value>messages</param-value>
</context-param>

    <context-param>
    <param-name>br.com.caelum.vraptor.encoding</param-name>
    <param-value>UTF-8</param-value>
</context-param>

JSP:

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>


<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<div class="accordion-group ">
                  <div class="accordion-heading">
                    <a class="accordion-toggle " href="<c:url value='/suggestionsLinks/'/>">
                      <img src="<c:url value='/img/linkIcon.png'/>">
                      <span><font color="white"><fmt:message key="sidebar.suggestionsLinks"/></font></span>
                    </a>
                  </div>
                </div>

messages.properties:

suggestionsLinks.title=Sugestões de Links

显示:Sugest�es链接

有谁知道如何解决它?

我的messages.properties文件已经在ISO-8859-1中。我正在使用eclipse并通过eclipse创建该文件。

0 个答案:

没有答案