Tomcat 各种连接器比较
Below is a small chart that shows how the connectors differentiate.
|
|
|
|
Java Blocking Connector Java Nio Blocking Connector APR Connector
Classname Http11Protocol Http11NioProtocol Http11AprProtocol
Tomcat Version 3.x 4.x 5.x 6.x 6.x 5.5.x 6.x
Support Polling NO YES YES
Polling Size N/A Unlimited - Restricted by mem Unlimited - Configurable
Read HTTP Request Blocking Non Blocking Blocking
Read HTTP Body Blocking Sim Blocking Blocking
Write HTTP Response Blocking Sim Blocking Blocking
SSL Support Java SSL Java SSL OpenSSL
SSL Handshake Blocking Non blocking Blocking
Max Connections maxThreads See polling size See polling size
|
|
|
|
|
Context 的监听器
Lifecycle Listeners |
If you have implemented a Java object that needs to know when this Context is started or stopped, you can declare it by nesting a Listener element inside this element. The class name you specify must implement the org.apache.catalina.LifecycleListener interface, and the class must be packaged in a jar and placed in the $CATALINA_HOME/lib directory. It will be notified about the occurrence of the corresponding lifecycle events. Configuration of such a listener looks like this:
|
|
|
|
<Context path="/examples" ...>
...
<Listener className="com.mycompany.mypackage.MyListener" ... >
...
</Context>
|
|
|
|
|
Note that a Listener can have any number of additional properties that may be configured from this element. Attribute names are matched to corresponding JavaBean property names using the standard property method naming patterns.
|
Single Sign On |
In many environments, but particularly in portal environments, it is desireable to have a user challenged to authenticate themselves only once over a set of web applications deployed on a particular virtual host. This can be accomplished by nesting an element like this inside the Host element for this virtual host:
|
|
|
|
<Host name="localhost" ...>
...
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
debug="0"/>
...
</Host>
|
|
|
|
|
The Single Sign On facility operates according to the following rules:
- All web applications configured for this virtual host must share the same Realm. In practice, that means you can nest the Realm element inside this Host element (or the surrounding Engine element), but not inside a Context element for one of the involved web applications.
- As long as the user accesses only unprotected resources in any of the web applications on this virtual host, they will not be challenged to authenticate themselves.
- As soon as the user accesses a protected resource in any web application associated with this virtual host, the user will be challenged to authenticate himself or herself, using the login method defined for the web application currently being accessed.
- Once authenticated, the roles associated with this user will be utilized for access control decisions across all of the associated web applications, without challenging the user to authenticate themselves to each application individually.
- As soon as the user logs out of one web application (for example, by invalidating the corresponding session if form based login is used), the user's sessions in all web applications will be invalidated. Any subsequent attempt to access a protected resource in any application will require the user to authenticate himself or herself again.
- The Single Sign On feature utilizes HTTP cookies to transmit a token that associates each request with the saved user identity, so it can only be utilized in client environments that support cookies
|
分享到:
相关推荐
Tomcat是Apache软件基金会下的一个开源项目,是一个广泛使用的Java Servlet容器,特别因为其轻量级、高效能和稳定性而闻名。它实现了Java Servlet和JavaServer Pages(JSP)规范,使得开发者能够用Java语言来编写...
Tomcat7、Tomcat8和Tomcat9是不同版本的Tomcat,每个版本都有其特性和改进。 **Tomcat7**: Tomcat7是2011年发布的,它主要支持Java Servlet 3.0和JSP 2.2规范。这个版本引入了一些重要改进,包括增强的安全性、更...
Apache Tomcat 7.0是Java Servlet和JavaServer Pages(JSP)的开源Web应用程序服务器,由Apache软件基金会开发和维护。它是最流行的轻量级应用服务器,特别适合部署Java Web应用程序。Tomcat 7.0是7.x系列的一个版本...
Tomcat 7 和 Tomcat 8 是两个非常重要的版本,它们是Apache软件基金会开发的开源Java Servlet容器,主要用于运行Java Web应用程序。这两个版本都遵循Java EE(Enterprise Edition)规范,但各自具有不同的特点和改进...
Apache Tomcat是一款广泛应用的开源Java Servlet容器,它实现了Java EE的Web部分,特别是Servlet和JSP规范。在本文中,我们将深入探讨Tomcat 7.0.0的安装版和7.0.11的免安装版之间的差异,以及如何进行安装和配置。 ...
版本:apache-tomcat-10.1.23 Tomcat 10 是 Apache Tomcat 的一个版本,它引入了一些新的功能和改进。以下是一些关键的新增功能: 1. JDK 11 支持:Tomcat 10 支持 JDK 11,这意味着它可以用于 JDK 11 的项目中。 2....
tomcat
在Linux(CentOS7)操作系统中安装Apache Tomcat并将其设置为开机启动是一项常见的任务,特别是在部署Java web应用时。本篇文章将详细讲解如何在CentOS7上安装Tomcat8并将其配置为自启动服务。 首先,我们来了解...
标题中的“tomcat6”指的是Apache Tomcat 6,这是一个开源的应用服务器,主要用来部署和运行Java Servlet和JavaServer Pages(JSP)应用程序。在Java Web开发领域,Tomcat是应用最广泛的轻量级服务器之一,尤其对于...
### Tomcat打补丁方法详解 #### 一、前言 Apache Tomcat是一款开源的Servlet容器,它能够作为Web服务器独立运行,也可以与Apache等其他Web服务器配合使用。Tomcat因其简单性和灵活性,在中小型项目中得到了广泛...
《Tomcat深入剖析》这本书是理解Apache Tomcat服务器工作原理的宝贵资料,它由美国作者撰写并被翻译成中文,适合各个层次的开发者阅读。通过深入学习,读者能够对Tomcat的内部机制有全面而深入的理解,从而更好地...
tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-...
《深入理解Tomcat-Redis-Session-Manager:在Tomcat7和Tomcat8中的应用》 在现代Web应用程序开发中,session管理是一个至关重要的环节,它涉及到用户会话的持久化和跨请求的数据共享。传统的session管理方式在高...
在Java Web应用服务器Tomcat 6中,日志管理是一个至关重要的部分,它帮助开发者跟踪应用程序的运行状态,排查问题,以及记录系统活动。这里提到的`tomcat-juli.jar`、`tomcat-juli-adapters.jar`和`log4j-1.2.12.jar...
Apache Tomcat 7.0.52 是一个广泛使用的开源软件,它是一个实现了Java Servlet、JavaServer Pages(JSP)和Java EE的Web应用程序容器。这个版本是免安装的,这意味着用户无需经过复杂的安装过程,只需解压到指定目录...
标题中的“tomcat7.0下的64位的tomcat7.exe 和tomcat7w.exe”指的是Apache Tomcat服务器在7.0版本中为64位操作系统提供的可执行文件。Tomcat是Apache软件基金会的一个开源项目,它是一个流行的Java Servlet容器,...
**Idea Tomcat Runner插件详解** 在Java开发领域,IntelliJ IDEA是一款备受推崇的集成开发环境(IDE),尤其以其高效、智能的代码编辑功能和丰富的插件生态而著称。对于使用Java Web应用的开发者来说,Tomcat服务器...
在Java Web应用中,Tomcat是一个广泛使用的开源应用服务器,它提供了Servlet容器和JSP引擎等核心功能。在处理数据库连接方面,Tomcat提供了一种高效且可管理的数据源实现,名为“tomcat-jdbc数据源”。这个数据源是...
Apache Tomcat 7是Apache软件基金会的一个开源项目,专门用于实现Java Servlet和JavaServer Pages(JSP)技术的标准,以及Java EE的Web应用程序部署。这个最新版本,即7.0.109,包含了对先前版本的改进和修复,旨在...
标题中的"tomcat-7.0.108.zip"是一个Tomcat服务器的特定版本,这里指的是Apache Tomcat 7.0.108。Tomcat是一款开源的Java Servlet容器,主要用于运行Java web应用程序,包括JSP和Servlet。这个版本号(7.0.108)表明...