如果把struts.xml的 <action name="login" class="Login" > 改为com.xyz.action.Login  ,tomcat就不报错。应该是spring的问题。哪位大侠给看看。

解决方案 »

  1.   

    Action的class难道不是写完整的路径吗?这里本来就应该写com.xyz.action.Login,写Login当然找不到了
      

  2.   

    <constant name="struts.objectFactory" value="spring" />
      

  3.   

    你必须要在spring中配置 Login的bean、
    c其class必须是完整包名称
      

  4.   

    你的那个filter-class 是错误的、<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    复制、就不会报此错误了、
      

  5.   

    3楼ok,
    struts.xml加上<constant name="struts.objectFactory" value="spring" /> struts对象工厂与spring整合
      

  6.   

    楼上几种说法都不错,其实action配置还有更简便的方法 用  <context:component-scan base-package="com.xyz.action" /> 还不容易出错
      

  7.   

    你的Login类应该是具体的包名到类名
      

  8.   

    解决了,是少了个包。struts2-spring-plugin