ActionForm为什么不能转LazyDynaBean
来源:互联网 发布:北京线下编程培训班 编辑:程序博客网 时间:2024/04/29 23:24
我是struts初学者,在Struts in Action 这本书上看到了LazyDynaBean这段例子,想把它用在我的开发上,却发现在Action的execute()函数中,我想把用户输入的表单参数提取出来时,ActionForm不能转LazyDynaBean.
上网找了好久,中文资料基本没有提到,后来找到一段英文资料:
LazyDynaBean Gotchas
The above solution using LazyDynaBean looks like a simple drop inreplacement which is great, however it assumes that the Struts Validator isactive. If you are not familiar with the validator (I wasn't when I gotdirected to this page for a solution) then it can cost you a number of hours ofhead scratching and frustration whilst you figure it out. To summarise andhopefully give someone a kick start to this, you need to:
1. Include the Commons Validator jar inyour project.
2. Modify your struts-config.xml toinclude the validator plugin.
3. Copy the the validator-rules.xmlfile from the struts download or source one from somewhere else.
4. Create and amend the valilation.xmlfile to include a section for each of your forms you wish to use LazyDynaBeans for.
I found the struts doco assumed you already knowhow all of this worked so wasn't much help to getting started. The best placeto find help is in referenced resources down the bottom of http://struts.apache.org/userGuide/dev_validator.html
才发现,原来要使用LazyDynaBean,前提是我们已经用了validator框架,而我之前没有用,所以无论怎样都无法弄出来。
相信有些初学者会犯同样的错误,在此提出,希望能帮到有需要的人。
- ActionForm为什么不能转LazyDynaBean
- beanutils -LazyDynaBean
- beanutils -LazyDynaBean
- (Struts)动态ActionForm(转)
- ActionForm
- ActionForm
- ActionForm
- ActionForm
- actionform
- ActionForm
- Struts Action and ActionForm (转)
- 转:开发人员为什么不能估算时间
- struts的ActionForm的使用(转)
- 为什么不能评论?
- 为什么tomcat不能解析$???- -
- 为什么时光不能倒流
- 为什么凯明就不能倒闭?
- 为什么不能下载
- 最佳网页宽度及其实现
- 新产品项目开发的艰难起步
- 宛在水中央
- 云输入法与传统输入法的整合之道
- 基于OHCI的USB主机 —— 总体构架
- ActionForm为什么不能转LazyDynaBean
- self与$this
- 相对定位和绝对定位
- November, 30
- 神秘的 ORACLE DUAL表
- Famous Project Host Websites(著名宿主服务器)
- 更新我的Twitter
- Linux的启动步骤
- Ajax控件UpdateProgress的使用心得