折腾了2天,终于可以正常运行网上的struts+spring+hibernation的程序
1. 去掉WEB-INF/libasm -2.2.3.jar的包,或者在myeclipse 窗口-首选项-Myeclipse-project capalibitiies/spring/spring2/libraries中去掉,下次发布不会出现。否则又是找不到servlet的错误。
2. src/applicationContext.xml发布时是在web-inf/classes下面,在structs-cofig.xml中要有classes
<
plug-in
className
="org.springframework.web.struts.ContextLoaderPlugIn"
>
< set-property property ="contextConfigLocation" value ="/WEB-INF/classes/applicationContext.xml" />
</ plug-in >
< set-property property ="contextConfigLocation" value ="/WEB-INF/classes/applicationContext.xml" />
</ plug-in >
这里写了,web.xml就不用设置。或者干脆就在web-inf中建立applicationContext.xml应该就用,路径也不用写classes,大部分错误是找不applicationContext.xml造成。