在学学习SSH过程中常遇见下面两个错误异常
1.Servlet action is not available
出现这个异常一般是配置文件的错误
可以参考http://blog.csdn.net/yangshoubo/archive/2009/09/05/4523457.aspx
2.java.lang.NullPointerException ×××.action.×××Action.xxxx
意思是说不能够执行某个Action,因为整合后的Hibernate是交给Spring来处理的,首先要看看applicationContext.xml文件中该Action的path是否和struts-config.xml中的一致,类型是否是Spring中所定义的类型,因为还很有可能是类型不一致造成的。
解决方法:
(1).struts-config.xml的action的type必须是org.springframework.web.struts.DelegatingActionProxy
(2).删除action的type属性,就不需要这个属性。
(3).在struts-config.xml中添加一个controller
<controller>
<set-property property="processorClass"
value="org.springframework.web.struts.DelegatingRequestProcessor" />
</controller>