实例介绍
1.Struts2_01_login 对应登录。。 login.jsp---------------------------------------html标签的登陆页面 login_struts2.jsp-------------------------------采用struts标签的登陆页面 login_struts_validate.jsp-----------------------有账号和密码验证的登陆页面 login_struts_validate_noblank.jsp---------------输入不能为空的登陆页面 2.Struts2_03_TypeConverter 继承defaulttypeconverter的转换器 3.Struts2_03_TypeConverter2 把一个商品变成了两个 4.Struts2_03_TypeConverter3 把上面的局部的转换器改成全局的了 xwork-conversion.properties 5.Struts2_03_TypeConverter4 把前面的继承改成了strutstypeconverter了 6.Struts2_03_TypeConverter5 扩展成数组,商品以数组输入。 注意下结果显示的页面result.jsp 以不同形式显示。有写标签的用法 7.Struts2_03_TypeConverter6 把上面数组的改成list的了 8.Struts2_03_TypeConverter7 OGNL表达式实现类型转换 9.Struts2_03_validate_review 输入校验 ————复习前面的 10.Struts2_04_validate_method ????????????? validateXXX方法校验得到的错误信息先显示出来,然后才是validate方法校验的字段错误信息 validate方法在validateXXX方法被调用后,依然会被调用 错误信息均保留在ArrayList中,谁先运行,谁的结果就排在前面 11.Struts2_04_validate_xml 字段校验和非字段校验----http://blog.csdn.net/loverszhaokai/archive/2010/12/07/6059686.aspx ----http://blog.csdn.net/loverszhaokai/archive/2010/12/03/6052056.aspx 12.Struts2_04_validate_properties 错误信息提示------国际化处理-----properties 13.Struts2_05Core_include 14.Struts2_06tags struts标签 15.Struts2_07i18n 国际化 16.Struts2_08interceptor 拦截器 17.Struts2_09up&down 上传和下载
【实例截图】
【核心代码】
16359647577032781740.rar
├── Struts2_03_TypeConverter6
│ ├── src
│ │ ├── com
│ │ │ └── product
│ │ │ ├── action
│ │ │ │ └── ProductAction.java
│ │ │ ├── converter
│ │ │ │ └── ProductStrutsConverter.java
│ │ │ └── model
│ │ │ └── Product.java
│ │ ├── struts.xml
│ │ └── xwork-conversion.properties
│ └── WebRoot
│ ├── index.jsp
│ ├── META-INF
│ │ └── MANIFEST.MF
│ ├── product.jsp
│ ├── result.jsp
│ └── WEB-INF
│ ├── classes
│ │ ├── com
│ │ │ └── product
│ │ │ ├── action
│ │ │ │ └── ProductAction.class
│ │ │ ├── converter
│ │ │ │ └── ProductStrutsConverter.class
│ │ │ └── model
│ │ │ └── Product.class
│ │ ├── struts.xml
│ │ └── xwork-conversion.properties
│ ├── lib
│ │ ├── commons-fileupload-1.2.1.jar
│ │ ├── commons-io-1.3.2.jar
│ │ ├── freemarker-2.3.16.jar
│ │ ├── javassist-3.7.ga.jar
│ │ ├── ognl-3.0.jar
│ │ ├── struts2-core-2.2.1.jar
│ │ └── xwork-core-2.2.1.jar
│ └── web.xml
├── Struts2_03_TypeConverter7
│ ├── src
│ │ ├── com
│ │ │ └── product
│ │ │ ├── action
│ │ │ │ ├── ProductAction.java
│ │ │ │ └── ProductsMapAction.java
│ │ │ └── model
│ │ │ └── Product.java
│ │ └── struts.xml
│ └── WebRoot
│ ├── index.jsp
│ ├── META-INF
│ │ └── MANIFEST.MF
│ ├── product.jsp
│ ├── products.jsp
│ ├── result.jsp
│ ├── results.jsp
│ └── WEB-INF
│ ├── classes
│ │ ├── com
│ │ │ └── product
│ │ │ ├── action
│ │ │ │ ├── ProductAction.class
│ │ │ │ └── ProductsMapAction.class
│ │ │ └── model
│ │ │ └── Product.class
│ │ └── struts.xml
│ ├── lib
│ │ ├── commons-fileupload-1.2.1.jar
│ │ ├── commons-io-1.3.2.jar
│ │ ├── freemarker-2.3.16.jar
│ │ ├── javassist-3.7.ga.jar
│ │ ├── ognl-3.0.jar
│ │ ├── struts2-core-2.2.1.jar
│ │ └── xwork-core-2.2.1.jar
│ └── web.xml
├── Struts2_04_validate_method
│ ├── src
│ │ ├── com
│ │ │ └── validate
│ │ │ ├── action
│ │ │ │ └── ValidateAction.java
│ │ │ └── converter
│ │ │ ├── DateConverter2.java
│ │ │ └── DateConverter.java
│ │ ├── struts.xml
│ │ └── xwork-conversion.properties
│ └── WebRoot
│ ├── hello.jsp
│ ├── index2.jsp
│ ├── index.jsp
│ ├── META-INF
│ │ └── MANIFEST.MF
│ ├── result.jsp
│ └── WEB-INF
│ ├── classes
│ │ ├── com
│ │ │ └── validate
│ │ │ ├── action
│ │ │ │ └── ValidateAction.class
│ │ │ └── converter
│ │ │ ├── DateConverter2.class
│ │ │ └── DateConverter.class
│ │ ├── struts.xml
│ │ └── xwork-conversion.properties
│ ├── lib
│ │ ├── commons-fileupload-1.2.1.jar
│ │ ├── commons-io-1.3.2.jar
│ │ ├── freemarker-2.3.16.jar
│ │ ├── javassist-3.7.ga.jar
│ │ ├── ognl-3.0.jar
│ │ ├── struts2-core-2.2.1.jar
│ │ └── xwork-core-2.2.1.jar
│ └── web.xml
└── Struts2_04_validate_properties
├── src
│ ├── com
│ │ └── validate
│ │ └── action
│ │ ├── ValidateAction.java
│ │ ├── ValidateAction.properties
│ │ └── ValidateAction-validation.xml
│ └── struts.xml
└── WebRoot
├── hello.jsp
├── index.jsp
├── META-INF
│ └── MANIFEST.MF
├── result.jsp
└── WEB-INF
├── classes
│ ├── com
│ │ └── validate
│ │ └── action
│ │ ├── ValidateAction.class
│ │ ├── ValidateAction.properties
│ │ └── ValidateAction-validation.xml
│ └── struts.xml
├── lib
│ ├── commons-fileupload-1.2.1.jar
│ ├── commons-io-1.3.2.jar
│ ├── freemarker-2.3.16.jar
│ ├── javassist-3.7.ga.jar
│ ├── ognl-3.0.jar
│ ├── struts2-core-2.2.1.jar
│ └── xwork-core-2.2.1.jar
└── web.xml
60 directories, 87 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论