又是转码的问题,同事是utf-8我是GBK,我在struts.xml里做了一个统一的转码结果我好了他乱了所以必须分开

解决方案 »

  1.   

    这个这个struts2的配置文件如果分开让他怎么读取??编码不一致你改了不就行了。现在都流行用UTF-8 省事
      

  2.   

    <!DOCTYPE struts PUBLIC 
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" 
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
    <include file="struts-XXX.xml" />  
    <package name=" "
    extends="struts-default">
    <action name=" "
    class=" ">
    </action>
    </package>
     
    </struts> 
    再新建一个XML就可以了
      

  3.   

    <include file="struts1.xml" />
    <include file="struts2.xml" />
    然后建成俩struts.xml就可以么,不用改里面的其他内容么
      

  4.   

    struts.xml是基本的文件,必须存在,struts.xml可以包含其他文件<include file="struts1.xml" /> 
    <include file="struts2.xml" /> 
      

  5.   

     package的名字必须是唯一的
      

  6.   

    <package name="default" extends="struts-default">
    这个必须两个文件的name="default"不一样么
      

  7.   

    对 package 的名字必须是唯一的!
      

  8.   

    在默认配置文件里,用include file把需要的配置文件路径都加入就可以了