struts2学习笔记(一)
来源:互联网 发布:安卓旧版本软件 编辑:程序博客网 时间:2024/06/09 14:56
Struts2.3.16.3环境搭建需要导入的核心包:
1、commons-fileupload-1.3.1.jar:struts的上传下载 (不导入报异常struts2-core-2.3.16.3.jar!/struts-default.xml:64:179org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501))
2、commons-io-2.2.jar:struts的上传下载
3、commons-lang3-3.1.jar:基础工具包,封装一些常用的基础操作,例如StringUtils类(不导入报异常java.lang.NoClassDefFoundError:org/apache/commons/lang3/StringUtilscom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:211))
4、commons-logging-1.1.3.jar:Jakarta的通用日志记录包(不导入报异常 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
Unable to locate configuration files of thename struts-plugin.xml, skipping)
5、freemarker-2.3.19.jar:表现层框架,定义了struts2的可视主题(不导入报异常 struts2-core-2.3.16.3.jar!/struts-default.xml:69:87)
6、javassist-3.11.0.GA.jar:Javassist是用来操作字节码的(不导入报异常java.lang.reflect.InvocationTargetExceptionClass:com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector)
7、log4j-1.2.17.jar:日志输出组件(不导入报异常Unableto locate configuration files of the name struts-plugin.xml, skipping)
8、ognl-3.0.6.jar:支持ognl表达式(不导入报异常Java.lang.NoClassDefFoundError:ognl/PropertyAccessor atcom.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:333)
9、struts2-core-2.3.16.3.jar:struts2核心库(不导入抱异常:java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter)
10、xwork-core-2.3.16.3.jar:webwork核心库(不导入异常:java.lang.NoClassDefFoundError: com/opensymphony/xwork2/ActionContext)
异常:[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SSHTest' did not find a matching property.
[SetPropertiesRule]警告的原因是Tomcat6.0的server.xml的context节点中不支持source属性,详细可以访问tomcat.apache.org,具体相关内容是:
For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the mainconf/server.xml
file cannot be reloaded without restarting Tomcat.
通关官网文档就可以轻松找到解决办法了。
这里通过修改Tomcat server配置(使用的是eclipse)。关闭server,然后在server视图中双击server,打开配置界面,选中下面的”Publish module contexts to separate XML files”,保存退出。
- Struts2学习笔记(一)
- struts2学习笔记(一)
- Struts2学习笔记(一)
- struts2 学习笔记(一)
- Struts2学习笔记(一)
- Struts2 学习笔记(一)
- struts2-学习笔记(一)
- struts2学习笔记(一)
- struts2学习笔记(一)
- Struts2学习笔记(一)
- Struts2学习笔记(一)
- Struts2学习笔记(一)
- struts2学习笔记(一)
- Struts2学习笔记(一)搭建struts2
- struts2学习笔记(一)
- Struts2 学习笔记一
- struts2学习笔记(一)
- struts2学习笔记一
- 直接利用Android手机破解微信加密数据库EnMicroMsg.db
- centos下,监控网络包所用到的工具
- Junit单元测试
- 苹果推送APNS自己总结
- WIN7 安装 VC6.0
- struts2学习笔记(一)
- linux c创建文件夹,并在文件夹中创建文件
- iOS 数据持久化
- Android给ListView设置分割线Divider样式
- 设计模式之原型模式
- 电子词典
- 在Quick Cocos2d-x中给CocosStudio中导出的UI(Widget)控件增加触摸(touch)事件
- java编译运行cpp文件
- Linux shell 之日期检查