【问题标题】:Appfuse does not show unicode characters properlyAppfuse 无法正确显示 unicode 字符
【发布时间】:2013-06-05 21:24:18
【问题描述】:

我正在使用 tomcat 7 开发 appfuse 模块化应用程序。 但是在添加我的新语言环境后, - 表示波斯语的 fa- 波斯语字符无法正确显示。

在我的 pom.xml 中:

<plugin>
 <groupId>org.codehaus.mojo</groupId>
  <artifactId>native2ascii-maven-plugin</artifactId>
  <version>1.0-beta-1</version>
  <executions>
  <execution>
  <id>native2ascii-utf8</id>
   <goals>
   <goal>native2ascii</goal>
   </goals>
  <configuration>
  <encoding>UTF8</encoding>
  <includes>
   <include>ApplicationResources_zh*.properties</include>
   <include>ApplicationResources_ko*.properties</include>
   <include>ApplicationResources_fa*.properties</include>
   <include>displaytag_zh*.properties</include>
   <include>displaytag_fa*.properties</include>
   <include>errors_zh*.properties</include>
   <include>errors_ko*.properties</include>
   <include>errors_fa*.properties</include>
   </includes>
  </configuration>
 </execution>
</executions>
</plugin>

taglibs.jsp 的第一行,包含在我所有的 jsp 文件中:

<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>

但我的问题在哪里?

【问题讨论】:

    标签: java jsp unicode appfuse


    【解决方案1】:

    我的问题解决了!

    <%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
    

    我在common/taglibs.jsp 文件中添加了上面的标签,并使用以下命令将其包含在我的jsp 文件中:

    <%@ include file="/common/taglibs.jsp" %>
    

    所以这个标签是不可导入的,应该在每个jsp文件中直接使用!

    对不起,我的英语不好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-14
      • 1970-01-01
      • 1970-01-01
      • 2012-08-08
      • 2014-02-14
      • 2011-12-06
      • 2012-01-23
      相关资源
      最近更新 更多