和配置文件相对应的代码(struts1)

public void process(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
        // Wrap multipart requests with a special wrapper
        request = processMultipart(request);

// Identify the path component we will use to select a mapping
        String path = processPath(request, response);

if (path == null) {
            return;
        }

if (log.isDebugEnabled()) {
            log.debug("Processing a '" + request.getMethod() + "' for path '"
                + path + "'");
        }

// Select a Locale for the current user if requested
        processLocale(request, response);

// Set the content type and no-caching headers if requested
        processContent(request, response);
        processNoCache(request, response);

// General purpose preprocessing hook
        if (!processPreprocess(request, response)) {
            return;
        }

this.processCachedMessages(request, response);

// Identify the mapping for this request
        ActionMapping mapping = processMapping(request, response, path);

if (mapping == null) {
            return;
        }

// Check for any role required to perform this action
        if (!processRoles(request, response, mapping)) {
            return;
        }

// Process any ActionForm bean related to this request
        ActionForm form = processActionForm(request, response, mapping);

processPopulate(request, response, form, mapping);

// Validate any fields of the ActionForm bean, if applicable
        try {
            if (!processValidate(request, response, form, mapping)) {
                return;
            }
        } catch (InvalidCancelException e) {
            ActionForward forward = processException(request, response, e, form, mapping);
            processForwardConfig(request, response, forward);
            return;
        } catch (IOException e) {
            throw e;
        } catch (ServletException e) {
            throw e;
        }

// Process a forward or include specified by this mapping
        if (!processForward(request, response, mapping)) {
            return;
        }

if (!processInclude(request, response, mapping)) {
            return;
        }

// Create or acquire the Action instance to process this request
        Action action = processActionCreate(request, response, mapping);

if (action == null) {
            return;
        }

// Call the Action instance itself
        ActionForward forward =
            processActionPerform(request, response, action, form, mapping);

// Process the returned ActionForward instance
        processForwardConfig(request, response, forward);
    }

struts深入原理之RequestProcessor与xml的更多相关文章

  1. 菜鸟学Struts2——Struts工作原理

    在完成Struts2的HelloWorld后,对Struts2的工作原理进行学习.Struts2框架可以按照模块来划分为Servlet Filters,Struts核心模块,拦截器和用户实现部分,其中 ...

  2. [JavaEE,MVC] Struts工作原理

    基本概念 Struts是Apache 基金会Jakarta 项目组的一个Open Source 项目,它采用MVC模式,能够很好地帮助java 开发者利用J2EE开发Web应用.和其他的java架构一 ...

  3. struts工作原理不错的解释___

    Struts 使用 Model 2 架构.Struts 的ActionServlet 控制导航流.其他Struts 类,比如Action, 用来访问业务逻辑类.当 ActionServlet 从容器接 ...

  4. struts工作原理(图解)

    Struts2框架的工作原理: 1.服务器启动,会加载我们的xml配置文件中的内容. 2.服务器启动之后,过来一个servlet请求,如user类中的save方法.请求过来先过过滤器(strutsPr ...

  5. Struts1——离BeanUtils看struts其原理1

    在Struts中非常典型的特点就是使用了ActionForm来搜集表单数据,可是搜集到的表单数据所有都是String类型的.假设我们直接拿来使用我们会面临一个非常麻烦的问题就是频繁的类型装换. Str ...

  6. SSH深度历险(十一) AOP原理及相关概念学习+xml配置实例(对比注解方式的优缺点)

    接上一篇 SSH深度历险(十) AOP原理及相关概念学习+AspectJ注解方式配置spring AOP,本篇我们主要是来学习使用配置XML实现AOP 本文采用强制的CGLB代理方式 Security ...

  7. struts工作原理

    在struts2的应用中,从用户请求到服务器返回相应响应给用户端的过程中,包含了许多组件如:Controller.ActionProxy.ActionMapping.Configuration Man ...

  8. Hibernate、Spring和Struts工作原理及使用理由

    1.读取并解析配置文件2.读取并解析映射信息,创建SessionFactory3.打开Sesssion4.创建事务Transation5.持久化操作6.提交事务7.关闭Session8.关闭Sesst ...

  9. struts2中struts.xml和web.xml文件解析及工作原理

    web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp ...

随机推荐

  1. Android中的requestWindowFeature

    朋友推荐使用博客记录工作中的难点以及常犯的错误,仅作为笔记,首先整理之前的工作日志. requestWindowFeature(featrueId),它的功能是启用窗体的扩展特性: 注意:该方法必须放 ...

  2. listview选中没有效果

    listview选中没有效果了,设置了android:listselector也没有效果,最后发现是listview中的item布局设置了背景颜色导致,把item的背景色去掉就OK了 http://b ...

  3. C++多态(一)

    面试题目中关于多态的问题不少,例如重载.虚函数(覆盖).多态的概念等等,这里做一个梳理,包含如下内容: 一.多态的定义 (一)定义 能够呈现不同形态的特性或状态. (二)两种多态性 1.编译时的多态性 ...

  4. caffe 在window下编译(windows7, cuda8.0,matlab接口编译)

    1. 环境:Windows7,Cuda8.0,显卡GTX1080,Matlab2016a,VS2013 (ps:老板说服务器要装windows系统,没办法,又要折腾一番,在VS下编译好像在cuda8. ...

  5. blender 2.6 快捷键

    右键单击 选中 A 取消选择/全选 中键拖动 旋转 中键滚动放大/缩小 Shift+中键拖动 平移 右上斜线三角区域拖动 产生新视窗 Shift+c准星复位 Num1前视图 Ctrl+Num1后视图 ...

  6. 分享一个漂亮WPF界面框架创作过程及其源码

    本文会作为一个系列,分为以下部分来介绍: (1)见识一下这个界面框架: (2)界面框架如何进行开发: (3)辅助开发支持:Demo.模板.VsPackage制作. 框架源码如下所示. 本文介绍第(1) ...

  7. 自己写一个java.lang.reflect.Proxy代理的实现

    前言 Java设计模式9:代理模式一文中,讲到了动态代理,动态代理里面用到了一个类就是java.lang.reflect.Proxy,这个类是根据代理内容为传入的接口生成代理用的.本文就自己写一个Pr ...

  8. dijit样式定制之TextBox(一)

    参考资料:http://dojotoolkit.org/reference-guide/1.9/dijit/themes.html http://archive.dojotoolkit.org/nig ...

  9. 实战-Fluxion与wifi热点伪造、钓鱼、中间人攻击、wifi破解

    原作者:PG     整理:玄魂工作室-荣杰 目录: 0x00-Fluxion是什么 0x01-Fluxion工作原理 0x02-Kali上安装fluxion 0x03-Fluxion工具使用说明+实 ...

  10. [.net 面向对象编程基础] (15) 抽象类

    [.net 面向对象编程基础] (15) 抽象类 前面我们已经使用到了虚方法(使用 Virtual修饰符)和抽象类及抽象方法(使用abstract修饰符)我们在多态一节中说到要实现类成员的重写必须定义 ...