解决方案 »

  1.   

    index.jsp的内容:
    <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <%@ taglib uri="/struts-tags" prefix="s"%>    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>国际化</title>
    </head>
    <body>
    <s:text name="welcome"/>
    </body>
    </html>
      

  2.   

    web.xml的内容:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
      <display-name>native</display-name>
      <filter>
           <filter-name>struts2</filter-name>
           <filter-class>
               org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
           </filter-class>
       </filter>
        <filter-mapping>
       <filter-name>struts2</filter-name>
       <url-pattern >/*</url-pattern>   
       </filter-mapping>
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>   
      </welcome-file-list>
    </web-app>
      

  3.   

    这个问题难道是unicode码的事?用eclipse安装properties Editor的时候报错,但是在windows-proferences-java下能找到Properties Files Editor,右键单击properties文件:open with-Properties File Editor没有转换成unicode码,还是要手动编译这个properties?