Multiple annotations found at this line:
- cvc-datatype-valid.1.2.1: '/user' is not a valid value for 'NCName'.
- cvc-attribute.3: The value '/user' of attribute 'id' on element 'bean' is not valid 
 with respect to its type, 'ID'.
好像是bean 的id不能命名不能以/开始,要怎么解决?

解决方案 »

  1.   

    命名规则,应该和JAVA的命名规则一样吧,只能以字母下划线还有一个美元符开头!
      

  2.   

    我的智囊团的是这样的
    <bean id="/jsp/user" class="com.mldn.struts.action.UserAction">
    <property name="iuserdao">
    <ref bean="iuserdaoimpl"/>
    </property>
    </bean>
      

  3.   

    <bean name="/jsp/user" class="com.mldn.struts.action.UserAction"> 
    <property name="iuserdao"> 
    <ref bean="iuserdaoimpl"/> 
    </property> 
    </bean>改成name就可以了  你在spring里面配置action吗?
      

  4.   


    对!多个name相同的bean还能取出个集合/数组好像。蹭分good luck
      

  5.   

    应该把Id 改成 Name 就可以拉
      

  6.   

    一个问题 :
    struts1在spring配置文件中是用的是bean name;
    struts2在spring配置文件中用的是bean id;
    这两者有区别吗?
      

  7.   


    好像没有区别spring之所以用id又用name
    就是为了躲避id中不能用“/”之类的特殊文字的要求,
    比如配置springMVC中配置URLMapping的时候,
    就是用bean的name来对应请求的。servlet协议制定者和bean的id规则制定者肯定没有沟通好,呵呵good luck
      

  8.   

    改成name就可以了···id 和name 有什么区别吗?目前没发现··