struts图解说明

 
本文根据 CSDN 上的 BLOG "Struts 入门好文章,通俗易懂(转载)选择自 chenxiaohong3905 Blog "而来;
     下面是我针对上片文章的一个图解,struts是基于MVC框架的,该图简单明了的说明整个struts运行流程;


next1: 根据你提交表单的申请 JSP 服务器容器把 HelloWorld.do 映射到 <servlet-mapping>
next2: JSP
服务器容器把 <servlet-mapping> HelloWorld.do 指到 <action-mappings> path="/HelloWorld";
next3: struts
控制器根据 name="HelloForm" <form-beans> 中对应的 <form-bean>
next4: <form-bean>
调用指定的 type
           
关联 : 如果 validate "true" 那么调用 type 类的 validate();
next5:  struts
控制器在 HelloForm bean 处理结束会根据 <action-mappings> type 调用指定的 HelloAction
           
关联 : mapping.findForward() 方法调用 <action-mappings> <forward>
 

你可能感兴趣的:(jsp,bean,mvc,struts,Blog,服务器)