4、struts处理流程和action的管理方式

(1)用户请求——>StrutsPrepareAndExecuteFilter——>Interceptor(struts2内置的一些拦截器)——>Action(用户编写的action类)——>Result(类似struts1的forward)——>Jsp/html——>响应
(2)struts1和struts2的action在管理方面的不同:
        在struts2中与struts1不同,struts2对用户的每一个请求都会创建一个action,所有每一条线程都使用一个新的action,所有struts2是线程安全的,属于原型模式(type);
        而struts1当action一旦创建出来,放进缓存,每次调用都在缓存中获取,其为单例模式(single),只存在一个action;




原文地址:https://www.cnblogs.com/zmpandzmp/p/3649032.html