Tomcat源码解析(三):StandardContext

StandardContextCatalina主要包括Connector和Container,StandardContext就是一个Container,它主要负责对进入的用户请求进行处理。实际来说,不是由它来进行处理,而是交给内部的valve处理。 一个context表示了一个外部应用,它包含多个wrapper,每个wrapper表示一个servlet定义。/** * Standard impl
摘要由CSDN通过智能技术生成

StandardContext

Catalina主要包括Connector和Container,StandardContext就是一个Container,它主要负责对进入的用户请求进行处理。实际来说,不是由它来进行处理,而是交给内部的valve处理。
一个context表示了一个外部应用,它包含多个wrapper,每个wrapper表示一个servlet定义。

/**
 * Standard implementation of the <b>Context</b> interface.  Each
 * child container must be a Wrapper implementation to process the
 * requests directed to a particular servlet.
 *
 * @author Craig R. McClanahan
 * @author Remy Maucherat
 * @version $Revision: 1.112 $ $Date: 2002/09/09 14:39:37 $
 */

public class StandardContext
    extends ContainerBase
    implements Context {
   


    // ----------------------------------------------------------- Constructors
    /**
     * Create a new StandardContext component with the default basic Valve.
     */
    public StandardContext() {

        super();
        pipeline.setBasic(new StandardContextValve());
        namingResources.setContainer(this);

    }

StandardContext主要成员


/**
 * The application available flag for this Context.
 */
private boolean available = false;

/**
 * The "correctly configured" flag for this Context.
 * context是否已经正确设置完成
 */
private boolean configured = false;

/**
 * The document root for this web application.
 */
private String docBase = null;

/**
 * The set of filter definitions for this application, keyed by
 * filter name.
 * 过滤器定义
 */
private HashMap filterDefs = new HashMap();


/**
 * The set of filter mappings for this application, in the order
 * they were defined in the deployment descriptor.
 * 过滤器匹配
 */
private FilterMap filterMaps[] = new FilterMap[0];

/**
 * The login configuration descriptor for this web application.
 * 登陆权限验证
 */
private LoginConfig loginConfig = null;

  /**
 * The Java class name of the default Mapper class for this Container.
 */
private String mapperClass =
    "org.apache.catalina.core.StandardContextMapper";


/**
 * The security role mappings for this application, keyed by role
 * name (as used within the application).
 * 角色匹配。权限验证用到
 */
private HashMap roleMappings = new HashMap();


/**
 * The servlet mappings for this web application, keyed by
 * matching pattern.
 * servlet匹配。用于根据url等匹配对应servlet
 */
private HashMap servletMappings = new<
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值