error.missing.password对应的中文存在吗?用native2ascii编译了吗

解决方案 »

  1.   

    jsp中:
    <!--errors-->
    <logic:messagesPresent>
     <tr>
       <ul>
        <html:messages id="error">
          <li class="strRed"><bean:write name="error"/></li>
        </html:messages>
       </ul>
       <hr>
      </tr>
    </logic:messagesPresent>
    formbean中:
      ActionErrors errors = new ActionErrors();
      errors.clear();
               errors.add("name",new ActionError("error.missing.password"));
               //jsp如果是我那种方法,name名可以任意
      

  2.   

    现在问题有所变化了,个人怀疑是properties文件配置出了问题
    我在struts-config文件中配了
    <message-resources parameter="net.ApplicationResources" />
    在net包里面也有ApplicationResources.properties
    可无论new ActionError("error.missing.password")里面放的key是什么,哪怕properties文件里面没有这个参数显示的结果都一样。另外:
    当我把ApplicationResources.properties文件名改成ApplicationResources123.properties时,在启Tomcat的时候一样显示加载成功
    2004-11-17 16:07:30 org.apache.struts.util.PropertyMessageResources <init>
    信息: Initializing, config='net.ApplicationResources', returnNull=true狂faint!!!