struts 2 有感 待续
来源:互联网 发布:网络使人亲近二辩问题 编辑:程序博客网 时间:2024/05/20 15:41
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包, 就可以运行了。
觉得 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包, 就可以运行了。
- struts 2 有感 待续
- 使用struts有感!
- Struts开发有感
- 重构基本概念--->ruby重构有感(一)--未完待续!!!
- 重构基本概念--->ruby重构有感(一)--未完待续!!!
- 读《暗时间》(Dark Time)有感【未完待续】
- ERP入门2,待续...
- [DB2] 常用命令2(待续)
- 未完待续2
- 待续
- 待续
- 待续
- 待续
- 待续
- 待续。。。
- (待续......)
- 待续。。。。。
- 待续
- 3.5.5. Falcon线程
- 普通壳的脱壳方法和脱壳技巧
- JDOM查询XML文档实例
- JDOM修改XML文档实例
- Flex应用展示-GOOGLE FUTURE RIA SEARCH ENGINE
- struts 2 有感 待续
- ioc简介
- An unhandled win32 exception occurred in explored.exe[1108]
- fgets getc
- ASP之ADO的添加新记录
- 我的人生?
- Flex应用展示之-3DDEMO
- Windows API一日一练(59)CreateFileMapping和MapViewOfFile函数
- TWEENLITE过渡效果再开发