2014年4月9日

Struts2请求处理流程及源码分析

摘要: 1.1 Struts2请求处理1. 一个请求在Struts2框架中的处理步骤:a) 客户端初始化一个指向Servlet容器的请求;b) 根据Web.xml配置,请求首先经过ActionContextCleanUp过滤器,其为可选过滤器,这个过滤器对于Struts2和其他框架的集成很有帮助(SiteMesh Plugin),主要清理当前线程的ActionContext和Dispatcher;c) 请求经过插件过滤器,如:SiteMesh、etc等过滤器;d) 请求经过核心过滤器FilterDispatcher,执行doFilter方法,在该方法中,询问ActionMapper来决定这个请求是否需 阅读全文

posted @ 2014-04-09 13:35 锟斤拷锟斤拷 阅读(153) 评论(0) 推荐(0) 编辑

Struts2请求流程

摘要: 1. 一个请求在Struts2框架中的处理步骤:a) 客户端初始化一个指向Servlet容器的请求;b) 根据Web.xml配置,请求首先经过ActionContextCleanUp过滤器,其为可选过滤器,这个过滤器对于Struts2和其他框架的集成很有帮助(SiteMesh Plugin),主要清理当前线程的ActionContext和Dispatcher;c) 请求经过插件过滤器,如:SiteMesh、etc等过滤器;d) 请求经过核心过滤器FilterDispatcher,执行doFilter方法,在该方法中,询问ActionMapper来决定这个请求是否需要调用某个Action;e) 阅读全文

posted @ 2014-04-09 12:00 锟斤拷锟斤拷 阅读(336) 评论(0) 推荐(0) 编辑

struts ValueStack 详解

摘要: 一、ValueStack 1.ValueStack是一个接口,在struts2中使用OGNL(Object-Graph Navigation Language)表达式实际上是使用 实现了ValueStack接口的类OgnlValueStack.它是ValueStack的默认实现类. 2.Valu... 阅读全文

posted @ 2014-04-09 10:56 锟斤拷锟斤拷 阅读(1168) 评论(0) 推荐(0) 编辑

struts OGNL详解

摘要: 首先了解下OGNL的概念:OGNL是Object-Graph Navigation Language的缩写,全称为对象图导航语言,是一种功能强大的表达式语言,它通过简单一致的语法,可以任意存取对象的属性或者调用对象的方法,能够遍历整个对象的结构图,实现对象属性类型的转换等功能。此外,还得先需弄懂OGNL的一些知识:1.OGNL表达式的计算是围绕OGNL上下文进行的。OGNL上下文实际上就是一个Map对象,由ognl.OgnlContext类表示。它里面可以存放很多个JavaBean对象。它有一个上下文根对象。上下文中的根对象可以直接使用名来访问或直接使用它的属性名访问它的属性值。否则要加前缀“ 阅读全文

posted @ 2014-04-09 10:00 锟斤拷锟斤拷 阅读(205) 评论(0) 推荐(0) 编辑

Ognl对象图导航语言 源码

摘要: // --------------------------------------------------------------------------// Copyright (c) 1998-2004, Drew Davidson and Luke Blanshard// All rights reserved.//// Redistribution and use in source and binary forms, with or without// modification, are permitted provided that the following conditions 阅读全文

posted @ 2014-04-09 09:57 锟斤拷锟斤拷 阅读(272) 评论(0) 推荐(0) 编辑

valuestack 根对象CompoundRoot 源码

摘要: /* * Copyright 2002-2006,2009 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 阅读全文

posted @ 2014-04-09 09:43 锟斤拷锟斤拷 阅读(226) 评论(0) 推荐(0) 编辑

ServletActionContext 源码

摘要: /* * $Id: ServletActionContext.java 651946 2008-04-27 13:41:38Z apetrelli $ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF .. 阅读全文

posted @ 2014-04-09 09:26 锟斤拷锟斤拷 阅读(295) 评论(0) 推荐(0) 编辑

ActionContext源码

摘要: /* * Copyright 2002-2006,2009 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 阅读全文

posted @ 2014-04-09 09:25 锟斤拷锟斤拷 阅读(208) 评论(0) 推荐(0) 编辑

OgnlValueStack 源码

摘要: /* * Copyright 2002-2006,2009 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 阅读全文

posted @ 2014-04-09 09:24 锟斤拷锟斤拷 阅读(451) 评论(0) 推荐(0) 编辑

ValueStack 源码

摘要: /* * Copyright 2002-2007,2009 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 阅读全文

posted @ 2014-04-09 09:23 锟斤拷锟斤拷 阅读(205) 评论(0) 推荐(0) 编辑

OgnlContext 源码

摘要: // Copyright (c) 1998-2004, Drew Davidson and Luke Blanshardpackage ognl;import ognl.enhance.LocalReference;import java.util.*;/** * This class defines the execution context for an OGNL expression * * @author Luke Blanshard (blanshlu@netscape.net) * @author Drew Davidson (drew@ognl.org) */public cl. 阅读全文

posted @ 2014-04-09 09:22 锟斤拷锟斤拷 阅读(519) 评论(1) 推荐(0) 编辑

导航