properties 文件在用了struts的myeclipes开发环境下应放在那个文件下,用ResourceBundle res = ResourceBundle.getBundle(OPTION_FILE_NAME)语句就可读取,是否需求配置什么啊!谢谢!是WEB-INF文件下吗???

解决方案 »

  1.   

    一般默认情况下,创建struts的时候,他会放在你指定的路径下面
    他的默认是 com.company.struts 就会放在这个下面,如果你把改名了,改成
    com.test.struts,那么就会放在com.test.struts包下面
      

  2.   

    看你的struts-config.xml中是如何配置的
    假如:
    <message-resources parameter="ApplicationResources"/>
    则ApplicationResources.properties就放在WEB-INF/classes下面若指明了具体的包,就和该包下的class放在一起,打成了jar也没事的
      

  3.   

    我的资源文件在struts-config.xml中的配置。
        <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!--                         资源文件                               -->
        <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <message-resources parameter="com.ems.view.struts.ApplicationResources" />
       
        在我的工程src下面有个com.ems.view.struts包,下面有ApplicationResources_zh_CN.properties和ApplicationResources.properties两个资源文件。