struts1课堂笔记
struts1课堂笔记
自定义Struts框架
开发以下类
1. ActionServlet
读取配置文件 dom4j 填充form
派发请求:调用对应的action的execute方法。 查找响应: 2. ActionForm
reset方法 validate方法 3. Action
execute(ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse) 4. ActionMapping
属性: path :String name :String type :String validate :String forwards :HashMap 5. ActionFormward
name :String path :String 6. 配置文件:
<struts-config> <display>XXX自定义Struts</display> <form-beans> <from-bean name=”from名” type=”类名”></from-bean> </form-beans> <action-mappings> <action path=”URL” type=”Action类” name=”参数frombean的名字”> <formward name=”状态1” path=”要跳转的路径1” /> <formward name=”状态2” path=”要跳转的路径2” /> </action> </action-mappings> </struts-config>
7. ActionConfig,FormConfig
搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新教学研究Struts1[1].X学习笔记(2)全文阅读和word下载服务。
相关推荐: