================================================================================
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.
================================================================================
====================================================
Building The Apache Tomcat 7.0 Servlet/JSP Container
====================================================
This subproject contains the source code for Tomcat 7.0, a container that
implements the Servlet 3.0, JSP 2.2, EL 2.2 and WebSocket 1.1 specifications
from the Java Community Process <http://www.jcp.org/>.
Note: If you just need to run Apache Tomcat, it is not necessary to build
it. You may simply download a binary distribution. It is cross-platform.
Read RUNNING.txt for the instruction on how to run it.
In order to build a binary distribution version of Apache Tomcat from a
source distribution, do the following:
(1) Download and Install a Java 6 and Java 7 Development Kit
1. If the JDKs are already installed, skip to (2).
2. Download a version 6 of the Java Development Kit (JDK) release (use the
latest update available for your chosen version) from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
or from another JDK vendor.
Note regarding later versions of Java:
As documented elsewhere, one of the components in Apache Tomcat includes
a private copy of the Apache Commons DBCP library. The source code
for this library is downloaded, processed by the build script
(renaming the packages) and compiled.
Due to changes in JDBC interfaces implemented by the library between
versions of Java SE specification, the library has to target specific
version of Java and can be compiled only with the JDK version
implementing this version of specification. Therefore, the build Tomcat
build process must be executed with a Java 6 JDK.
See Apache Commons DBCP project web site for more details on
available versions of the library and its requirements,
http://commons.apache.org/dbcp/
If you really want to use a later version of JDK to build Tomcat,
several workarounds are possible. One of them is to skip building
the component (tomcat-dbcp.jar).
3. Install the Java 6 JDK according to the instructions included with the
release.
4. Set an environment variable JAVA_HOME to the pathname of the directory
into which you installed the JDK release.
5. Download a version 7 of the Java Development Kit (JDK) release (use the
latest update available for your chosen version) from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
or from another JDK vendor.
6. Install the Java 7 JDK according to the instructions included with the
release.
* NOTE: The Java 7 JDK is only required if you wish to build Tomcat with
JSR-356 (Java WebSocket 1.1) support.
(2) Install Apache Ant version 1.8.2 or later on your computer
1. If Apache Ant version 1.8.2 or later is already installed on your computer, skip to (3).
2. Download a binary distribution of Ant from:
http://ant.apache.org/bindownload.cgi
3. Unpack the binary distribution into a convenient location so that the
Ant release resides in its own directory (conventionally named
"apache-ant-[version]").
For the purposes of the remainder of this document, the symbolic name
"${ant.home}" is used to refer to the full pathname of the release
directory.
4. Create an ANT_HOME environment variable to point the directory
${ant.home}.
5. Modify the PATH environment variable to include the directory
${ant.home}/bin in its list. This makes the "ant" command line script
available, which will be used to actually perform the build.
(3) Building Tomcat 7.0
(3.1) Checkout or obtain the source code for Tomcat 7.0
Checkout the source using SVN, selecting a tag for released version or
trunk for the current development code, or download and unpack a source
package.
* Tomcat SVN repository URL:
http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/
* Source packages can be downloaded from:
http://tomcat.apache.org/download-70.cgi
The location where the source has been placed will be further referred as
${tomcat.source}.
The Tomcat local build process does not modify line-endings. The svn repository
is configured so that all files will be checked out with the line-ending
appropriate for the current platform. When using a source package you should
ensure that you use the source package that has the appropriate line-ending
for your platform:
zip -> CRLF
tar.gz -> LF
Note that the release build process does modify line-endings to ensure that
each release package has the appropriate line-endings.
(3.2) Building
1. The build is controlled by creating a ${tomcat.source}/build.properties
file.
It is recommended to always create the file, because of unfortunate
default value of base.path property. You may start with the following
content for the file:
# ----- Default Base Path for Dependent Packages -----
# Replace this path with the directory path where dependencies binaries
# should be downloaded
base.path=/home/me/some-place-to-download-to
2. Configure base.path property by adding it to the
${tomcat.source}/build.properties file.
The base.path property specifies the place where Tomcat dependencies
required by the build are downloaded. It is recommended to place this
directory outside of the source tree, so that you do not waste your
time re-downloading the libraries.
* NOTE: The default value of the base.path property configures the build script
to download the libraries required to build Tomcat to the
${user.home}/tomcat-build-libs directory.
* NOTE: Users accessing the Internet through a proxy must use the properties
file to indicate to Ant the proxy configuration.
The following properties should be added to the ${tomcat.source}/build.properties
file.
proxy.use=on
proxy.host=proxy.domain
proxy.port=8080
proxy.user=username
proxy.password=password
See Apache Ant documentation for the <setproxy> task for details.
* NOTE: Users wishing to build Tomcat with JSR-356 (Java WebSocket 1.1) support
must also set the java.7.home build property to the location of the Java 7 JDK
installation.
3. Go to the sources directory and run Ant:
cd ${tomcat.source}
ant
This will execute the "deploy" target in build.xml.
Once the build has completed successfully, a usable Tomcat installation
will have been produced in the ${tomcat.source}/output/build directory,
and can be started and stopped with the usual scripts.
Note that the build includes Tomcat documentation, which can be found
in the output/build/webapps/docs directory.
The path of the output directory can be controlled by specifying the
"to
没有合适的资源?快使用搜索试试~ 我知道了~
Tomcat7 基于 Redis 的 Session 共享完整软件包
共1970个文件
html:711个
class:324个
java:240个
需积分: 5 0 下载量 78 浏览量
2023-10-10
17:36:40
上传
评论
收藏 33.42MB ZIP 举报
温馨提示
Tomcat7 下配置基于 Redis 的 Session 共享,这样方便使用Nginx反向代理实现负载均衡。 这个软件包里面包含了3个配置好session共享的tomcat7和一个windwos下的redis 6.0安装包。下载后按照说明先启动redis服务,然后再分别启动3个tomcat就可以测试了。 在tomcat里我内置了一个简单页面,在浏览器中分别访问三个tomcat的主页就可以测试,访问3个tomcat后您会发现session值是一样。后续您可以自行配置Nginx反向代理三个tomcat测试。 如果您对Nginx的配置不是很熟悉可以参考这个地址: https://blog.csdn.net/qifu123/article/details/133089692 和 https://blog.csdn.net/qifu123/article/details/133140341 前一个是介绍Nginx安装配置的,后一个是介绍反向代理配置方法的。
资源推荐
资源详情
资源评论
收起资源包目录
Tomcat7 基于 Redis 的 Session 共享完整软件包 (1970个子文件)
admin 18B
apache 18B
catalina.bat 15KB
catalina.bat 15KB
catalina.bat 15KB
service.bat 7KB
service.bat 7KB
service.bat 7KB
tool-wrapper.bat 4KB
tool-wrapper.bat 4KB
tool-wrapper.bat 4KB
setclasspath.bat 3KB
setclasspath.bat 3KB
setclasspath.bat 3KB
digest.bat 2KB
digest.bat 2KB
digest.bat 2KB
configtest.bat 2KB
configtest.bat 2KB
configtest.bat 2KB
version.bat 2KB
version.bat 2KB
version.bat 2KB
startup.bat 2KB
startup.bat 2KB
startup.bat 2KB
shutdown.bat 2KB
shutdown.bat 2KB
shutdown.bat 2KB
index_jsp.class 17KB
index_jsp.class 17KB
index_jsp.class 17KB
Room.class 8KB
Room.class 8KB
Room.class 8KB
ChatServlet.class 7KB
ChatServlet.class 7KB
ChatServlet.class 7KB
SnakeWebSocketServlet.class 7KB
SnakeWebSocketServlet.class 7KB
SnakeWebSocketServlet.class 7KB
CompressionResponseStream.class 6KB
CompressionResponseStream.class 6KB
CompressionResponseStream.class 6KB
Clock2.class 6KB
Clock2.class 6KB
Clock2.class 6KB
DrawMessage.class 6KB
DrawMessage.class 6KB
DrawMessage.class 6KB
CompressionFilter.class 5KB
CompressionFilter.class 5KB
CompressionFilter.class 5KB
CompressionServletResponseWrapper.class 5KB
CompressionServletResponseWrapper.class 5KB
CompressionServletResponseWrapper.class 5KB
AsyncStockServlet.class 5KB
AsyncStockServlet.class 5KB
AsyncStockServlet.class 5KB
Snake.class 5KB
Snake.class 5KB
Snake.class 5KB
Client.class 5KB
Client.class 5KB
Client.class 5KB
Snake.class 5KB
Snake.class 5KB
Snake.class 5KB
SessionExample.class 4KB
SessionExample.class 4KB
SessionExample.class 4KB
SnakeAnnotation.class 4KB
SnakeAnnotation.class 4KB
SnakeAnnotation.class 4KB
JspCalendar.class 4KB
JspCalendar.class 4KB
JspCalendar.class 4KB
SnakeWebSocketServlet$SnakeMessageInbound.class 4KB
SnakeWebSocketServlet$SnakeMessageInbound.class 4KB
SnakeWebSocketServlet$SnakeMessageInbound.class 4KB
CookieExample.class 4KB
CookieExample.class 4KB
CookieExample.class 4KB
DrawboardEndpoint.class 4KB
DrawboardEndpoint.class 4KB
DrawboardEndpoint.class 4KB
Room$Player.class 4KB
Room$Player.class 4KB
Room$Player.class 4KB
ChatAnnotation.class 4KB
ChatAnnotation.class 4KB
ChatAnnotation.class 4KB
SnakeTimer.class 4KB
SnakeTimer.class 4KB
SnakeTimer.class 4KB
JspCalendar.class 3KB
JspCalendar.class 3KB
JspCalendar.class 3KB
RequestHeaderExample.class 3KB
RequestHeaderExample.class 3KB
共 1970 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
QIFU
- 粉丝: 323
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功