struts 2 有感 待续

struts 2  有感 待续

觉得 struts2  的官方网站上的第一个例子不是太好, 我开始试的时候,
把 struts2  的所有的 jar 包 都放到web-inf/lib  下了, 结果老出错

就是下面的两个错:


-------------------------------------------------------------------
Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testStruts/WEB-INF/lib/struts2-spring-plugin-2.0.6.jar!/struts-plugin.xml:8:132

Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware

---------------------------------------------------------------------

其他的地方都检查了好几遍  但是一运行tomcat 就出错, 找了半天原因原来是
没看到下面这句话  http://struts.apache.org/2.x/docs/simple-setup.html

If any Struts 2 Plugins are included, then other JARs may be needed too. For example, the optional Spring Plugin requires the Spring JARs to be present.

这对初学者也要求太高了吧, 要是不知道 Spring 是的什么东西就不要用struts2 了。

去掉了那几个jar包, 就可以运行了。


 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值