No bean named 'userService' is defined
Error creating bean with name 'action.UserAction': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userService' is defined
Unable to instantiate Action, action.UserAction, defined for 'user' in namespace '/'Error creating bean with name 'action.UserAction': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userService' is defined
这个提示已经够明显了吧,在你的UserAction里声明的userService注入出错,找不到相应的id="userService"的bean,检查一下是不是配置文件命名写错了,如果service是注入形式的,那么检查下@Service("userService")有没有写错
ApplicationContext context = new ClassPathXmlApplicationContext("spring/applicationContext.xml");
使用context.getBean("?");自己获取bean,看看是不是没注册上。