/*
* 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.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Enumeration;
import java.util.EventListener;
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.Locale;
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.Filter;
import javax.servlet.FilterConfig;
import javax.servlet.FilterRegistration;
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.ServletRegistration.Dynamic;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestAttributeListener;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.ServletSecurityElement;
import javax.servlet.SessionCookieConfig;
import javax.servlet.SessionTrackingMode;
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.Realm;
import org.apache.catalina.Valve;
import org.apache.catalina.Wrapper;
import org.apache.catalina.deploy.ApplicationListener;
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.descriptor.XmlIdentifiers;
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
*/
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 provi
没有合适的资源?快使用搜索试试~ 我知道了~
apache-tomcat-7.0.57-src
共2000个文件
java:1775个
xml:177个
jsp:162个
5星 · 超过95%的资源 需积分: 10 101 下载量 165 浏览量
2014-11-19
12:05:34
上传
评论 3
收藏 6.77MB ZIP 举报
温馨提示
Tomcat是应用(java)服务器,它只是一个servlet容器,是Apache的扩展。 该文件是Tomcat的源代码
资源推荐
资源详情
资源评论
收起资源包目录
apache-tomcat-7.0.57-src (2000个子文件)
tomcat.css 6KB
package.html 60KB
index.html 17KB
package.html 11KB
ELParser.html 9KB
snake.html 9KB
index.html 7KB
echo.html 6KB
welcome.bin.html 5KB
welcome.main.html 5KB
reqparams.html 5KB
package.html 4KB
chat.html 4KB
package.html 4KB
reqinfo.html 4KB
package.html 3KB
sessions.html 3KB
package.html 3KB
cookies.html 3KB
helloworld.html 3KB
ColorGameBean.html 2KB
package.html 2KB
package.html 2KB
reqheaders.html 2KB
svgexample.html 2KB
index.html 2KB
package.html 2KB
package.html 2KB
package.html 2KB
notes.html 2KB
calendar.html 2KB
book.html 2KB
package.html 2KB
howto.html 2KB
package.html 2KB
package.html 2KB
jspattribute.html 2KB
colors.html 2KB
shuffle.html 2KB
login.html 2KB
config.html 1KB
hello.html 1KB
repeat.html 1KB
dynamicattrs.html 1KB
package.html 1KB
jts.html 1KB
index.html 1KB
functions.html 1KB
CheckTest.html 1KB
DummyCart.html 1KB
composite.html 1KB
products.html 1KB
clr.html 1KB
hello.html 1KB
cresult.html 1KB
carts.html 1KB
index.html 1KB
crt.html 1KB
numguess.html 1KB
panel.html 1KB
implicit-objects.html 1KB
textRotate.html 1KB
basic-comparisons.html 1KB
basic-arithmetic.html 1KB
index.html 1KB
index.html 1KB
index.html 1KB
index.html 1KB
basic.html 1KB
snoop.html 1KB
fwd.html 1KB
inc.html 1KB
foo.html 1KB
xml.html 1KB
plugin.html 1KB
error.html 1KB
er.html 1KB
date.html 1KB
index.html 1KB
check.html 1KB
foreach.html 1KB
choose.html 1KB
package.html 1KB
if.html 1KB
package.html 1KB
package.html 1KB
package.html 1KB
index.html 1KB
package.html 1KB
package.html 1KB
package.html 1KB
package.html 1KB
package.html 1KB
package.html 1KB
package.html 1KB
package.html 997B
index.html 933B
index.html 930B
package.html 916B
package.html 911B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- wzy1990102015-11-10挺好用的,内容很全面。
- qq_261798612015-06-23相当不错的源码
- franky8142015-01-12相当不错的源码,可以用
codepeng
- 粉丝: 14
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功