/*
* 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 licenses this file to You 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.core;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicLong;
import javax.management.ListenerNotFoundException;
import javax.management.MBeanNotificationInfo;
import javax.management.Notification;
import javax.management.NotificationBroadcasterSupport;
import javax.management.NotificationEmitter;
import javax.management.NotificationFilter;
import javax.management.NotificationListener;
import javax.management.ObjectName;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.servlet.FilterConfig;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestAttributeListener;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.ServletSecurityElement;
import javax.servlet.descriptor.JspConfigDescriptor;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionListener;
import org.apache.catalina.Authenticator;
import org.apache.catalina.Container;
import org.apache.catalina.ContainerListener;
import org.apache.catalina.Context;
import org.apache.catalina.Globals;
import org.apache.catalina.Host;
import org.apache.catalina.InstanceListener;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Loader;
import org.apache.catalina.Manager;
import org.apache.catalina.Pipeline;
import org.apache.catalina.Valve;
import org.apache.catalina.Wrapper;
import org.apache.catalina.deploy.ApplicationParameter;
import org.apache.catalina.deploy.ErrorPage;
import org.apache.catalina.deploy.FilterDef;
import org.apache.catalina.deploy.FilterMap;
import org.apache.catalina.deploy.Injectable;
import org.apache.catalina.deploy.InjectionTarget;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.deploy.MessageDestination;
import org.apache.catalina.deploy.MessageDestinationRef;
import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.deploy.SecurityCollection;
import org.apache.catalina.deploy.SecurityConstraint;
import org.apache.catalina.loader.WebappLoader;
import org.apache.catalina.session.StandardManager;
import org.apache.catalina.startup.TldConfig;
import org.apache.catalina.util.CharsetMapper;
import org.apache.catalina.util.ContextName;
import org.apache.catalina.util.ExtensionValidator;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.URLEncoder;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.naming.ContextBindings;
import org.apache.naming.resources.BaseDirContext;
import org.apache.naming.resources.DirContextURLStreamHandler;
import org.apache.naming.resources.FileDirContext;
import org.apache.naming.resources.ProxyDirContext;
import org.apache.naming.resources.WARDirContext;
import org.apache.tomcat.InstanceManager;
import org.apache.tomcat.JarScanner;
import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.tomcat.util.scan.StandardJarScanner;
/**
* 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 $Id: StandardContext.java 1201569 2011-11-14 01:36:07Z kkolinko $
*/
public class StandardContext extends ContainerBase
implements Context, NotificationEmitter {
private static final Log log = LogFactory.getLog(StandardContext.class);
// ----------------------------------------------------------- Constructors
/**
* Create a new StandardContext component with the default basic Valve.
*/
public StandardContext() {
super();
pipeline.setBasic(new StandardContextValve());
broadcaster = new NotificationBroadcasterSupport();
// Set defaults
if (!Globals.STRICT_SERVLET_COMPLIANCE) {
// Strict servlet compliance requires all extension mapped servlets
// to be checked against welcome files
resourceOnlyServlets.add("jsp");
}
}
// ----------------------------------------------------- Class Variables
/**
* The descriptive information string for this implementation.
*/
private static final String info =
"org.apache.catalina.core.StandardContext/1.0";
/**
* Array containing the safe characters set.
*/
protected static URLEncoder urlEncoder;
/**
* GMT timezone - all HTTP dates are on GMT
*/
static {
urlEncoder = new URLEncoder();
urlEncoder.addSafeCharacter('~');
urlEncoder.addSafeCharacter('-');
urlEncoder.addSafeCharacter('_');
urlEncoder.addSafeCharacter('.');
urlEncoder.addSafeCharacter('*');
urlEncoder.addSafeCharacter('/');
}
// ----------------------------------------------------- Instance Variables
/**
* Allow multipart/form-data requests to be parsed even when the
* target servlet doesn't specify @MultipartConfig or have a
* <multipart-config> element.
*/
protected boolean allowCasualMultipartParsing = false;
/**
* Control whether remaining request data will be read
* (swallowed) even if the request violates a data size constraint.
*/
private boolean swallowAbortedUploads = true;
/**
* The alternate deployment descriptor name.
*/
private String altDDName = null;
/**
* Lifecycle provider.
*/
private InstanceManager instanceManager = null;
/**
* Associated host name.
*/
private String hostName;
/**
* The antiJARLocking flag for this Context.
*/
private boolean antiJARLocking = false;
/**
* The antiResourceLocking flag for this Context.
*/
private boolean antiResourceLocking = false;
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
tomcat源码工程,build步骤: 1,解压到eclipse工程目录下 2,找到build.properties.default文件,重命名为build.properties 3,打开build.properties,找到base.path,将该变量定位到你的硬盘上一个存在的目录,比如我的eclipse工程路径为d:/project可写为base.path=d:/project/tomcat_plugins 4,安装ant 5,在有build.xml的路径上,在windows命令行输入ant 6,运行ant任务,tomcat插件依赖项目会下载到base.path路径内,同时编译 ps,包内包含编译后的build 导入eclipse: 新建工程,以ant方式导入,选择build.xml
资源推荐
资源详情
资源评论
收起资源包目录
tomcat7.0编译好的源码 (4790个子文件)
build.properties.bak 10KB
catalina.bat 13KB
catalina.bat 13KB
service.bat 6KB
service.bat 6KB
tool-wrapper.bat 4KB
tool-wrapper.bat 4KB
setclasspath.bat 3KB
setclasspath.bat 3KB
digest.bat 2KB
digest.bat 2KB
configtest.bat 2KB
configtest.bat 2KB
version.bat 2KB
version.bat 2KB
startup.bat 2KB
startup.bat 2KB
shutdown.bat 2KB
shutdown.bat 2KB
cpappend.bat 1KB
cpappend.bat 1KB
side_left.bmp 337KB
header.bmp 10KB
bug52121-part1 100KB
bug52121-part2 171KB
StandardContext.class 93KB
WebXml.class 57KB
Generator$GenerateVisitor.class 55KB
ContextConfig.class 54KB
WebappClassLoader.class 54KB
Request.class 51KB
ELParser.class 38KB
WebdavServlet.class 37KB
Parser.class 37KB
Digester.class 34KB
Validator$ValidateVisitor.class 34KB
HTMLManagerServlet.class 33KB
DefaultServlet.class 33KB
DeltaManager.class 32KB
JNDIRealm.class 31KB
ApplicationContext.class 31KB
StandardWrapper.class 31KB
HostConfig.class 31KB
Generator.class 30KB
ManagerServlet.class 30KB
JspC.class 29KB
AbstractReplicatedMap.class 28KB
JspDocumentParser.class 27KB
MBeanUtils.class 27KB
AbstractHttp11Processor.class 27KB
NamingContextListener.class 26KB
CoyoteAdapter.class 25KB
RealmBase.class 24KB
FailedContext.class 24KB
Response.class 24KB
StandardSession.class 24KB
Mapper.class 23KB
JspRuntimeLibrary.class 23KB
ContainerBase.class 23KB
AbstractEndpoint.class 22KB
AprEndpoint.class 22KB
IntrospectionUtils.class 22KB
WebappLoader.class 22KB
ConnectionPool.class 21KB
PageContextImpl.class 21KB
NamingResources.class 21KB
JspUtil.class 21KB
TagLibraryInfoImpl.class 21KB
ProxyDirContext.class 21KB
SimpleTcpCluster.class 20KB
JSSESocketFactory.class 20KB
ManagerBase.class 20KB
Tomcat.class 20KB
BaseDirContext.class 20KB
WebRuleSet.class 20KB
JDBCStore.class 19KB
XMLEncodingDetector.class 19KB
DefaultInstanceManager.class 19KB
ELParserTokenManager.class 19KB
StatusTransformer.class 19KB
AccessLogValve.class 19KB
AbstractAjpProcessor.class 18KB
NonBlockingCoordinator.class 18KB
ApplicationDispatcher.class 18KB
MBeanFactory.class 18KB
NioEndpoint.class 18KB
JspCompilationContext.class 18KB
DataSourceProxy.class 18KB
Registry.class 17KB
ExpiresFilter.class 17KB
ApplicationContextFacade.class 17KB
DeltaSession.class 17KB
Catalina.class 16KB
PoolProperties.class 16KB
McastService.class 16KB
FarmWarDeployer.class 16KB
PageInfo.class 16KB
NioEndpoint$Poller.class 16KB
FormAuthenticator.class 15KB
Embedded.class 15KB
共 4790 条
- 1
- 2
- 3
- 4
- 5
- 6
- 48
资源评论
- qingganshuiyuan2012-08-11还需要自己编译,怎么还说是编译好的?
- 伦无次语2016-10-11学习下源码,一直没动手
- 凡高是我吗2015-04-20貌似还需要自己弄,骗人的
dingchd0212
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功