<!-- <result name="save" type="redirectAction">addUser.action!getALL</result> 
            本身想重定向到action的但是上面的这行老是报错呀!!
             -->
动态方法调用应该这么写
<result name="save" type="redirectAction">addUser!getALL.action</result>
不过不建议用这种用,推荐使用以下这种
<result name="save" type="redirectAction">
  <param name="actionName">addUser</param>
  <param name="method">getALL</param>
</result> 

解决方案 »

  1.   

    既然注入,为什么又new呢?  userService=new UserServiceImpl();
      

  2.   

    能说我注入失败的原因吗?是那里错了
    注入不要在new还有spring的扫描包com.ssh的.*去掉
      

  3.   

    Quote: 引用 6 楼 fangmingshijie 的回复:

    既然注入,为什么又new呢? [color=#FF0000] userService=new UserServiceImpl()
      

  4.   

    web.xml文件中建议你使用classpath:applicationContext.xml加载
      

  5.   


    如果applcationContext是在src下面的画就是用classpath:applicationContext.xml
      

  6.   

    本身想重定向到action的但是上面的这行老是报错呀!!似乎不应该那样用重定向吧
      

  7.   

    spring 自动注入,就不用去NEW 新的对象了
      

  8.   


    我知道不用new,问题是我没new的时候也注入不进来。。注入不进来我才new测试的。但是在dao层的时候this.getHibernateTemplate()还是空的呀。。没值。。都继承了hibernatesuprot还是没值。何解。。    请无视new。。