JS:var queryString = "display.do?";
Spring:
<bean name="/display" class="strutsPackage.action.DisplayAction">
<property name="service">
<ref local="FeederService" />
</property>
</bean>
DisplayAction:public FeederService getService() {
return service;
} public void setService(FeederService service) {
this.service = service;
}然后输出看service,报的是null,我郁闷.property的name改为id也试了.没用.请教大家了!

解决方案 »

  1.   

    你参考一下这篇文章,希望对你有帮助 好像你配置有问题~~~http://www.360doc.com/content/061130/15/10587_278178.html
      

  2.   

    action中直接从spring文件取bean就可以了,不是通过get,set封装取的
      

  3.   

    你的 js里面的路径不和Spring里面的不一致。js里面因该是  "/display"
      

  4.   

    回2楼,我用SSH的注入方法,应该可以的啊?
    谁能告诉我为什么不行
      

  5.   

    this.service= (FeederService) SpringApplicationContextFinder.getApplicationContext().getBean("FeederService");
    把get set方法留着也可以,加这个就是了