是不是lz的properties文件放错地方了应该放在classes下

解决方案 »

  1.   

    順便問下,index.title你設了沒有?
      

  2.   

    在原来的struts-config.xml中添加<message-resources>元素,以指明所要用到的资源包。修改部分代码如下:<struts-config>
     <message-resources parameter="ApplicationResources"/>
    </struts-config>
    创建ApplicationResources.properties放在WEB-INF\classes目录中
    ApplicationResources.properties的内容如下:index.title = 标题
      

  3.   

    ApplicationResources.properties文件的内容:
    index.title=Struts Tutorial
    我把该 文件放到classes下 问题还是一样啊!
      

  4.   

     
    <struts-config>
     <message-resources parameter="ApplicationResources"/>
    </struts-config>你注意了,是要在struts-config.xml文件中添加这个元素!
    红色部分的前面还要写清楚ApplicationResources的路径!!
      

  5.   

    <struts-config>
     <message-resources parameter="ApplicationResources"/>
    </struts-config>parameter="ApplicationResources“这个属性要写上路径,比如parameter="xx.xx.ApplicationResources"
      

  6.   

    struts-config.xml文件中要配置message-resource,楼上说得不错