提交
This commit is contained in:
commit
3419cc6e7f
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/target/
|
||||||
|
.settings/.jsdtscope
|
||||||
|
.classpath
|
||||||
|
.settings/org.eclipse.core.resources.prefs
|
||||||
|
.project
|
||||||
|
*.prefs
|
||||||
|
*.component
|
||||||
|
.settings/org.eclipse.wst.common.project.facet.core.xml
|
||||||
|
*.container
|
||||||
|
*.name
|
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
13
.idea/compiler.xml
generated
Normal file
13
.idea/compiler.xml
generated
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<annotationProcessing>
|
||||||
|
<profile name="Maven default annotation processors profile" enabled="true">
|
||||||
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<module name="mcg" />
|
||||||
|
</profile>
|
||||||
|
</annotationProcessing>
|
||||||
|
</component>
|
||||||
|
</project>
|
7
.idea/encodings.xml
generated
Normal file
7
.idea/encodings.xml
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
20
.idea/jarRepositories.xml
generated
Normal file
20
.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
12
.idea/misc.xml
generated
Normal file
12
.idea/misc.xml
generated
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
201
LICENSE
Normal file
201
LICENSE
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed 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.
|
63
README.md
Normal file
63
README.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# mcg-helper研发助手
|
||||||
|
## mcg-helper是什么?
|
||||||
|
|
||||||
|
定位一款研发个化性流程自动化系统,提供一套可视化”流程自动化“的规范,丰富的拖拽控件,良好的交互性,基于流程图实现自动化,能够很好感知到可控性、实时性、可追溯性。更好的便于理解和证明可行性,选择以研发工作需求场景实现自动化,把较典型的代码生成、应用部署、环境搭建、模拟环境、自动发现与检测、数据处理等场景,通过设计一系列自定义控件来实现自动化,从而达到减少简化工作量。其核心亮点在于打造自己的流程控件,实现自定义需求。
|
||||||
|
|
||||||
|
## mcg-helper的优势?
|
||||||
|
* 轻量级、无浸入性、部署简单(无需安装数据库或特定配置,jdk8、tomcat8即可独立运行)
|
||||||
|
* 跨平台性、可移植性、可扩展性,基于B/S架构,通过浏览器即可访问
|
||||||
|
* 一套流程自动化规范,轻松快捷实现流程自动化
|
||||||
|
* 二次开发,打造自定义拖拽流程控件,让流程自动化更贴近需求
|
||||||
|
* WEB SSH,通过浏览器即可与Linux交互,支持google身份认证
|
||||||
|
|
||||||
|
## mcg-helper能够做什么?
|
||||||
|
|
||||||
|
快速让你实现流程自动化,内置控件作为抛砖引玉,选择以研发工作中的实际需求场景:
|
||||||
|
一、代码生成:快速构建代码生成功能,通过可视化界面,采用拖拽式控件及连接线绘制流程图,自定义实现生成任何想要的代码。
|
||||||
|
二、环境搭建:以java应用来讲,比如安装jdk,tomcat,zookeeper,mq,hbase,mysql等等都可以实现自动化。
|
||||||
|
三、应用部署:GIT代码拉取,MAVEN打包,SFTP上传,Linux脚本执行,自动化一气呵成,且轻松实现切换用户等交互性需求,数据初始化,多应用的启动顺序或特定条件触发,均可实现自动化操作。
|
||||||
|
四、模拟操作:接口调试,数据模拟,功能自测等等,适用于测试场景。
|
||||||
|
五、自动检测:基于流程循环,实现主动触发、检测、控制的需求场景,如服务器性能检测,应用存活检测,循环扫描操作等。
|
||||||
|
六、数据处理:如开发环境定期同步数据到测试环境,或多个数据库数据加工过滤等需求。
|
||||||
|
七、WEB SSH:通过浏览器操作Linux,简单便捷。
|
||||||
|
|
||||||
|
整体上讲,基于流程图清晰易直观,且控件使用简单,易掌控,学习门槛低。系统“主页”里面有视频教程链接,能够很好的上手和玩转mcg-helper,熟悉以后可以自定义控件,满足自己的自动化需求。
|
||||||
|
|
||||||
|
## 视频教程:
|
||||||
|
[第一节、视频教程内容介绍](https://edu.csdn.net/course/play/5954) 探讨研发工作中典型的重复繁杂工作,可通过流程自动化实现代替的常见场景。
|
||||||
|
[第二节、mcg-helper初步认识教程](https://edu.csdn.net/course/play/5954/300130) mcg-helper概述、核心设计、基本操作、工作原理、入门示例、使用场景等。
|
||||||
|
[第三节、开始、文本、结束控件讲解](https://edu.csdn.net/course/play/5954/300416) 了解流程控件运行原理,介绍与演示控件的功能与作用。
|
||||||
|
[第四节、data、json控件讲解](https://edu.csdn.net/course/play/5954/305640) 全局变量的使用、动态读取表结构信息、输出指定内容到文件。
|
||||||
|
[第五节、js、java、python控件讲解](https://edu.csdn.net/course/play/5954/309934) 在流程中使用多种计算机语言,发挥各自优势,让流程更为灵活强大。
|
||||||
|
[第六节、sql查询、sql执行控件讲解](https://edu.csdn.net/course/play/5954/310142) 实现常用关系型数据库的交互功能。
|
||||||
|
[第七节、Linux、循环、子流程控件讲解](https://edu.csdn.net/course/play/5954/324751) Linux SSH连接,流程循环功能,以及流程拆分复用与组合。
|
||||||
|
[第八节、万能代码生成讲解](https://edu.csdn.net/course/play/5954/365298) 以一款java开源框架jeecg为例子,实现一键代码生成。
|
||||||
|
[第九节、自定义控件讲解](https://edu.csdn.net/course/play/5954/466072) 实现自定义控件的思路以及完整走读代码实现。
|
||||||
|
|
||||||
|
## 初步认识mcg-helper
|
||||||
|
进入主页,里面包含QQ群、csdn博客、视频教程、开源地址、版本信息。
|
||||||
|

|
||||||
|
|
||||||
|
自定义生成代码
|
||||||
|

|
||||||
|
|
||||||
|
轻松搭建各种环境
|
||||||
|

|
||||||
|
|
||||||
|
快速实现应用发布
|
||||||
|

|
||||||
|
|
||||||
|
WEB SSH 实现Linux交互
|
||||||
|

|
||||||
|
|
||||||
|
流程执行
|
||||||
|

|
||||||
|
|
||||||
|
## mcg-helper控制台
|
||||||
|
在流程执行时会输出每个控件的执行相关信息,这样在绘制和调试流程时极为有用,整个流程执行的顺序与过程变得更加清晰。
|
||||||
|
以下为流程执行时,控制台输出部分截图:
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
673
apache-tomcat-9.0.109/BUILDING.txt
Normal file
673
apache-tomcat-9.0.109/BUILDING.txt
Normal file
@ -0,0 +1,673 @@
|
|||||||
|
================================================================================
|
||||||
|
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 9.0 Servlet/JSP Container
|
||||||
|
====================================================
|
||||||
|
|
||||||
|
This project contains the source code for Tomcat 9.0, a container that
|
||||||
|
implements the Servlet 4.0, JSP 2.3, EL 3.0, WebSocket 1.1 and JASPIC 1.1
|
||||||
|
specifications from the Java Community Process <https://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 Development Kit
|
||||||
|
|
||||||
|
1. If the JDK is already installed, skip to (2).
|
||||||
|
|
||||||
|
2. Download a version 17 or later of Java Development Kit (JDK) release (use
|
||||||
|
the latest update available for your chosen version) from one of:
|
||||||
|
|
||||||
|
http://www.oracle.com/technetwork/java/javase/downloads/index.html
|
||||||
|
http://openjdk.java.net/install/index.html
|
||||||
|
or another JDK vendor.
|
||||||
|
|
||||||
|
Note regarding later versions of Java:
|
||||||
|
|
||||||
|
As documented elsewhere, one of components in Apache Tomcat includes
|
||||||
|
a private copy of the Apache Commons DBCP 2 library.
|
||||||
|
|
||||||
|
The JDBC interfaces implemented by DBCP frequently change in non-backwards
|
||||||
|
compatible ways between versions of the Java SE specification. Therefore,
|
||||||
|
it is likely that DBCP 2 will only compile with the specific version of Java
|
||||||
|
listed above and that compilation will fail if a later version of Java is
|
||||||
|
used.
|
||||||
|
|
||||||
|
See Apache Commons DBCP 2 project web site for more details on
|
||||||
|
available versions of the library and its requirements,
|
||||||
|
|
||||||
|
https://commons.apache.org/dbcp/
|
||||||
|
|
||||||
|
3. Install the 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.
|
||||||
|
|
||||||
|
|
||||||
|
(2) Install Apache Ant version 1.10.2 or later on your computer.
|
||||||
|
|
||||||
|
1. If Apache Ant version 1.10.2 or later is already installed on your
|
||||||
|
computer, skip to (3).
|
||||||
|
|
||||||
|
2. Download a binary distribution of Ant from:
|
||||||
|
|
||||||
|
https://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 9.0
|
||||||
|
|
||||||
|
(3.1) Checkout or obtain the source code for Tomcat 9.0
|
||||||
|
|
||||||
|
Clone the source using git, then checkout a specific major branch or
|
||||||
|
main for the latest code development, or download and unpack a source
|
||||||
|
package.
|
||||||
|
|
||||||
|
* Tomcat GitHub repository URL:
|
||||||
|
|
||||||
|
https://github.com/apache/tomcat
|
||||||
|
|
||||||
|
* Source packages can be downloaded from:
|
||||||
|
|
||||||
|
https://tomcat.apache.org/download-90.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=true
|
||||||
|
proxy.host=proxy.domain
|
||||||
|
proxy.port=8080
|
||||||
|
proxy.user=username
|
||||||
|
proxy.password=password
|
||||||
|
|
||||||
|
See Apache Ant documentation for the <setproxy> task for details.
|
||||||
|
|
||||||
|
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
|
||||||
|
"tomcat.output" property in the build.properties file.
|
||||||
|
|
||||||
|
* NOTE: Do not run the build as the root user. Building and running Tomcat
|
||||||
|
does not require root privileges.
|
||||||
|
|
||||||
|
|
||||||
|
(4) Updating sources and rebuilding
|
||||||
|
|
||||||
|
It is recommended that you regularly update the downloaded Tomcat 9.0
|
||||||
|
sources using your git client.
|
||||||
|
|
||||||
|
For a quick rebuild of only modified code you can use:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant
|
||||||
|
|
||||||
|
|
||||||
|
(5) Special builds
|
||||||
|
|
||||||
|
There are several targets in Tomcat build files that are useful to be
|
||||||
|
called separately. They build components that you may want to build
|
||||||
|
quickly, or ones that are included in the full release and are not built
|
||||||
|
during the default "deploy" build.
|
||||||
|
|
||||||
|
(5.1) Building documentation
|
||||||
|
|
||||||
|
The documentation web application is built during the default "deploy"
|
||||||
|
build.
|
||||||
|
|
||||||
|
It can be built quickly by using the following commands:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant build-docs
|
||||||
|
|
||||||
|
The output of this command will be found in the following directory:
|
||||||
|
|
||||||
|
output/build/webapps/docs
|
||||||
|
|
||||||
|
|
||||||
|
The API documentation (Javadoc) is built during a "release" build. It is
|
||||||
|
easy to build it separately by using the following commands:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant javadoc
|
||||||
|
|
||||||
|
The output of this command will be found in the following directories:
|
||||||
|
|
||||||
|
output/dist/webapps/docs/api
|
||||||
|
output/dist/webapps/docs/elapi
|
||||||
|
output/dist/webapps/docs/jspapi
|
||||||
|
output/dist/webapps/docs/servletapi
|
||||||
|
|
||||||
|
|
||||||
|
(5.2) Building the extras (commons-logging, webservices etc.)
|
||||||
|
|
||||||
|
These components are documented on the "Additional Components"
|
||||||
|
(extras.html) page of documentation. They are built during a "release"
|
||||||
|
build.
|
||||||
|
|
||||||
|
You can build them by using the following commands:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant extras
|
||||||
|
|
||||||
|
(5.3) Building the embedded packages
|
||||||
|
|
||||||
|
These are built during a "release" build.
|
||||||
|
|
||||||
|
You can build them by using the following commands:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant embed
|
||||||
|
|
||||||
|
(5.4) Building the Windows installer
|
||||||
|
|
||||||
|
The Windows installer uses the NSIS installer framework.
|
||||||
|
It can be build on Windows, on any other platform which provides
|
||||||
|
the Wine Windows emulator or the NSIS binary "makensis".
|
||||||
|
|
||||||
|
Linux and MacOS are platforms, on which you can install Wine or
|
||||||
|
"makensis".
|
||||||
|
|
||||||
|
Selecting between Wine and makensis on non-Windows platforms can
|
||||||
|
be done by setting the ant property "nsis.tool" to either "wine"
|
||||||
|
or "makensis" in build.properties.
|
||||||
|
|
||||||
|
If you want to sign the installer, you will need to set some
|
||||||
|
properties with names prefixed with "codesigning" in your build.properties.
|
||||||
|
For details see the targets "jsign-installer" and "jsign-uninstaller"
|
||||||
|
in build.xml and the default property values in build.properties.default.
|
||||||
|
|
||||||
|
|
||||||
|
(6) Building a full release (as provided via the ASF download pages)
|
||||||
|
|
||||||
|
1. Remark on building the Windows installer
|
||||||
|
|
||||||
|
A full release includes the Windows installer which requires a Windows
|
||||||
|
environment, an installed Wine emulator or an installed native
|
||||||
|
"makensis" binary from the NSIS project. Creating a reproducible
|
||||||
|
installer using the "makensis" option needs a special build of "makensis".
|
||||||
|
For details see below.
|
||||||
|
|
||||||
|
Provided that Wine or "makensis" is available on non-Windows platforms,
|
||||||
|
a full release build may be made on Windows, Linux or MacOS.
|
||||||
|
|
||||||
|
If you do not want to build the Windows installer, the skip.installer
|
||||||
|
property may be set to skip the creation of the Windows installer.
|
||||||
|
|
||||||
|
2. Configure GPG, if needed
|
||||||
|
|
||||||
|
If the released artifacts have to be cryptographically signed with a
|
||||||
|
PGP signature, like the official ASF releases are, the following
|
||||||
|
property can be added to the build.properties file:
|
||||||
|
|
||||||
|
# Location of GPG executable (used only for releases)
|
||||||
|
gpg.exec=/path/to/gpg
|
||||||
|
|
||||||
|
You do not need it if you do not plan to sign the release.
|
||||||
|
|
||||||
|
If "gpg.exec" property does not point to an existing file, it will be
|
||||||
|
ignored and this feature will be deactivated.
|
||||||
|
|
||||||
|
You will be prompted for the GPG passphrase when the release build
|
||||||
|
starts, unless "gpg.passphrase" property is set.
|
||||||
|
|
||||||
|
3. If building the Windows installer on Windows
|
||||||
|
|
||||||
|
If running the build in a UAC enabled environment, building the Windows
|
||||||
|
installer requires elevated privileges. The simplest way to do this is to
|
||||||
|
open the command prompt used for the build with the "Run as administrator"
|
||||||
|
option.
|
||||||
|
|
||||||
|
4. Configure the code signing service
|
||||||
|
|
||||||
|
ASF committers performing official releases will need to configure the code
|
||||||
|
signing service so that the Windows installer is signed during the build
|
||||||
|
process. The following properties need to be added to the build.properties
|
||||||
|
file:
|
||||||
|
|
||||||
|
# Location of GPG executable (used only for releases)
|
||||||
|
gpg.exec=/path/to/gpg
|
||||||
|
# Code signing of Windows installer
|
||||||
|
do.codesigning=true
|
||||||
|
codesigning.storepass=request-via-pmc
|
||||||
|
codesigning.keypass=request-via-pmc
|
||||||
|
|
||||||
|
Release managers will be provided with the necessary credentials by the PMC.
|
||||||
|
|
||||||
|
If you want to verify the installer from a release by rebuilding it,
|
||||||
|
you can use the detached signatures provided in the official releases.
|
||||||
|
In this case you have to use the sources from the source release
|
||||||
|
archive, which contains these signatures. You also have to build
|
||||||
|
on Windows, use Wine, or use a special build of makensis to create
|
||||||
|
a reproducible installer, that fits the signature files.
|
||||||
|
|
||||||
|
5. Using a special "makensis" build on non-Windows (optional)
|
||||||
|
|
||||||
|
If you want to build a reproducible installer on non-Windows
|
||||||
|
by using "makensis" instead of "Wine", you need to build
|
||||||
|
"makensis" from a source download yourself. To build "makensis",
|
||||||
|
you need python, scons and a C compiler. You can build "makensis"
|
||||||
|
via an Ant target:
|
||||||
|
|
||||||
|
ant local-makensis
|
||||||
|
|
||||||
|
or you can build it manually using the following recipe.
|
||||||
|
|
||||||
|
First detect the needed version by looking for nsis.version
|
||||||
|
in build.properties.default.
|
||||||
|
|
||||||
|
Download and extract NSIS for Windows by running "ant download-dist". Note
|
||||||
|
the NSIS installation path from the output or by checking "nsis.bin.home" in
|
||||||
|
build.properties.default. For example by default:
|
||||||
|
nsis.bin.home=${base.path}/nsis-${nsis.version}
|
||||||
|
|
||||||
|
The corresponding sources will be downloaded to "nsis.src.home" in
|
||||||
|
build.properties.default. For example by default:
|
||||||
|
nsis.src.home=${base.path}/nsis-${nsis.version}-src
|
||||||
|
|
||||||
|
Install the scons Python software construction tool.
|
||||||
|
|
||||||
|
Run the following command in the extracted NSIS source directory:
|
||||||
|
|
||||||
|
scons UNICODE=yes PREFIX=${base.path}/nsis-${nsis.version}/Bin SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no VERSION=${nsis.version} install-compiler
|
||||||
|
|
||||||
|
You need to specify the correct value in VERSION (this ends up in the installer binary
|
||||||
|
so it needs to match). The PREFIX is not important, but you need to make sure
|
||||||
|
that the created binary "makensis" gets finally put into the "Bin" directory of
|
||||||
|
the NSIS binary distribution that "ant download-dist" installed. When using
|
||||||
|
"NSIS_CONFIG_CONST_DATA_PATH=no" the binary is independent of the value of "PREFIX".
|
||||||
|
|
||||||
|
In addition set the ant property "nsis.tool" to "makensis" in
|
||||||
|
build.properties.
|
||||||
|
|
||||||
|
6. Build the release:
|
||||||
|
|
||||||
|
Apache Tomcat releases are fully reproducible.
|
||||||
|
|
||||||
|
Release managers producing release builds must follow the following
|
||||||
|
procedure:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant pre-release
|
||||||
|
ant release
|
||||||
|
git commit -a -m "Tag <version-number>"
|
||||||
|
git tag <vesion-number>
|
||||||
|
git push origin <version-number>
|
||||||
|
ant release
|
||||||
|
git reset --hard HEAD~1
|
||||||
|
|
||||||
|
The output from either 'ant release' call may be uploaded as the official
|
||||||
|
release since they will be identical. It is recommended that the output from
|
||||||
|
the second call is used.
|
||||||
|
|
||||||
|
Anyone wishing to reproduce an official build must do so from an official
|
||||||
|
source release. The build tool chain defined in build.properties.release
|
||||||
|
must be used to reproduce an official build. Once unpacked to
|
||||||
|
${tomcat.source}, the following steps must be followed
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant release
|
||||||
|
|
||||||
|
Following the same steps without using the defined build tool chain will
|
||||||
|
create a release that is functionally the same as an official release but
|
||||||
|
not bit for bit identical.
|
||||||
|
|
||||||
|
|
||||||
|
(7) Tests
|
||||||
|
|
||||||
|
(7.1) Running Tomcat tests
|
||||||
|
|
||||||
|
Tomcat includes a number of junit tests. The tests are not run when a
|
||||||
|
release is built. There is separate command to run them.
|
||||||
|
|
||||||
|
To run the testsuite use the following command:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant test
|
||||||
|
|
||||||
|
It is advisable to redirect output of the above command to a file for later
|
||||||
|
inspection.
|
||||||
|
|
||||||
|
The JUnit reports generated by the tests will be written to the following
|
||||||
|
directory:
|
||||||
|
|
||||||
|
output/build/logs
|
||||||
|
|
||||||
|
By default the testsuite is run three times to test 3 different
|
||||||
|
implementations of Tomcat connectors: NIO, NIO2 and APR. (If you are not
|
||||||
|
familiar with Tomcat connectors, see config/http.html in documentation for
|
||||||
|
details).
|
||||||
|
|
||||||
|
The 3 runs are activated and deactivated individually by the following
|
||||||
|
properties, which all are "true" by default:
|
||||||
|
|
||||||
|
execute.test.nio=true
|
||||||
|
execute.test.nio2=true
|
||||||
|
execute.test.apr=true
|
||||||
|
|
||||||
|
The APR connector can be tested only if Tomcat-Native library binaries are
|
||||||
|
found by the testsuite. The "test.apr.loc" property specifies the directory
|
||||||
|
where the library binaries are located.
|
||||||
|
|
||||||
|
By default the "test.apr.loc" property specifies the following location:
|
||||||
|
|
||||||
|
output/build/bin/
|
||||||
|
|
||||||
|
If you are on Windows and want to test the APR connector you can put the
|
||||||
|
tcnative-1.dll file into ${tomcat.source}/bin/ and it will be copied
|
||||||
|
into the above directory when the build runs.
|
||||||
|
|
||||||
|
The unit tests include tests of the clustering functionality which require
|
||||||
|
multicast to be enabled. There is a simple application provided in the Tomcat
|
||||||
|
test source (org.apache.catalina.tribes.TesterMulticast) that can be used to
|
||||||
|
check if a machine supports multicast. Notes on enabling multicast for different
|
||||||
|
operating systems are provided in the Javadoc for that class.
|
||||||
|
|
||||||
|
|
||||||
|
(7.2) Running a single test
|
||||||
|
|
||||||
|
It is possible to run a single JUnit test class by adding the "test.entry"
|
||||||
|
property to the build.properties file. The property specifies the name of
|
||||||
|
the test class.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
test.entry=org.apache.catalina.util.TestServerInfo
|
||||||
|
|
||||||
|
It is possible to further limit such run to a number of selected test
|
||||||
|
methods by adding "test.entry.methods" property. The property specifies a
|
||||||
|
comma-separated list of test case methods.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
test.entry=org.apache.el.lang.TestELArithmetic
|
||||||
|
test.entry.methods=testMultiply01,testMultiply02
|
||||||
|
|
||||||
|
|
||||||
|
(7.3) Running a set of tests
|
||||||
|
|
||||||
|
It is possible to run a set of JUnit test classes by adding the "test.name"
|
||||||
|
property to the build.properties file. The property specifies an Ant
|
||||||
|
includes pattern for the fileset of test class files to run.
|
||||||
|
|
||||||
|
The default value is "**/Test*.java", so all test classes are being
|
||||||
|
executed (with few exceptions - see build.xml for several exclude patterns).
|
||||||
|
|
||||||
|
You can include multiple patterns by concatenating them with a comma (",")
|
||||||
|
as the separator.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
test.name=**/TestSsl.java,**/TestWebSocketFrameClientSSL.java
|
||||||
|
|
||||||
|
You can exclude specific JUnit test classes by adding the "test.exclude"
|
||||||
|
property to the build.properties file. The property specifies an Ant
|
||||||
|
excludes pattern for the fileset of test class files to exclude form the run.
|
||||||
|
The default value is empty, so no classes are excluded. The syntax is the same
|
||||||
|
as for the property "test.name".
|
||||||
|
|
||||||
|
|
||||||
|
(7.4) Other configuration options
|
||||||
|
|
||||||
|
1. It is possible to configure the directory where JUnit reports are
|
||||||
|
written to. It is configured by "test.reports" property. The default
|
||||||
|
value is
|
||||||
|
|
||||||
|
output/build/logs
|
||||||
|
|
||||||
|
2. It is possible to enable generation of access log file when the tests
|
||||||
|
are run. This is off by default and can be enabled by the following
|
||||||
|
property:
|
||||||
|
|
||||||
|
test.accesslog=true
|
||||||
|
|
||||||
|
The "access_log.<date>" file will be written to the same directory as
|
||||||
|
JUnit reports,
|
||||||
|
|
||||||
|
output/build/logs
|
||||||
|
|
||||||
|
3. The testsuite respects logging configuration as configured by
|
||||||
|
${tomcat.source}/conf/logging.properties
|
||||||
|
|
||||||
|
The log files will be written to the temporary directory used by the
|
||||||
|
tests,
|
||||||
|
|
||||||
|
output/test-tmp/logs
|
||||||
|
|
||||||
|
4. It is possible to configure formatter used by JUnit reports.
|
||||||
|
Configuration properties are "junit.formatter.type",
|
||||||
|
"junit.formatter.extension" and "junit.formatter.usefile".
|
||||||
|
|
||||||
|
For example the following property deactivates generation of separate report
|
||||||
|
files:
|
||||||
|
|
||||||
|
junit.formatter.usefile=false
|
||||||
|
|
||||||
|
5. It is possible to speed up testing by letting JUnit to run several
|
||||||
|
tests in parallel.
|
||||||
|
|
||||||
|
This is configured by setting "test.threads" property. The recommended
|
||||||
|
value is one thread per core.
|
||||||
|
|
||||||
|
6. Optional support is provided for the Cobertura code coverage tool.
|
||||||
|
|
||||||
|
NOTE: Cobertura is licensed under GPL v2 with parts of it being under
|
||||||
|
Apache License v1.1. See https://cobertura.github.io/cobertura/ for details.
|
||||||
|
Using it during Tomcat build is optional and is off by default.
|
||||||
|
|
||||||
|
Cobertura can be enabled using the following properties:
|
||||||
|
|
||||||
|
test.cobertura=true
|
||||||
|
test.threads=1
|
||||||
|
|
||||||
|
Using Cobertura currently requires setting test.threads configuration
|
||||||
|
property to the value of 1. Setting that property to a different value
|
||||||
|
will deactivate code coverage.
|
||||||
|
|
||||||
|
The report files by default are written to
|
||||||
|
|
||||||
|
output/coverage
|
||||||
|
|
||||||
|
7. The performance tests are written to run on reasonably powerful machines
|
||||||
|
(such as a developer may use day to day) assuming no other resource hungry
|
||||||
|
processes are running.
|
||||||
|
|
||||||
|
Performance tests may be an absolute test (how long to complete a number
|
||||||
|
of iterations of an operation or set of operations) or may be a relative
|
||||||
|
test (how long two or more different approaches take to generate the same
|
||||||
|
result). The absolute tests may be destructive in that they run until the
|
||||||
|
system runs out of resources.
|
||||||
|
|
||||||
|
Where there is no benefit in running an absolute performance test as part
|
||||||
|
of a standard test run, the test will be excluded by naming it
|
||||||
|
Tester*Performance.java.
|
||||||
|
|
||||||
|
The relative tests are included as part of a standard test run however,
|
||||||
|
where the assumptions made about host capabilities are not true (e.g. on
|
||||||
|
CI systems running in virtual machine) the tests may be deactivated by
|
||||||
|
using the following property:
|
||||||
|
|
||||||
|
test.excludePerformance=true
|
||||||
|
|
||||||
|
8. Some tests are require large heaps (e.g. 8GB). The CI systems used by the
|
||||||
|
project either cannot support heaps of this size or do not support them by
|
||||||
|
default. These tests are therefore disabled by default and may be enabled by
|
||||||
|
using the following property:
|
||||||
|
|
||||||
|
test.includeLargeHeap=true
|
||||||
|
|
||||||
|
9. Some tests include checks that the access log valve entries are as expected.
|
||||||
|
These checks include timings. On slower / loaded systems these checks will
|
||||||
|
often fail. The checks may be relaxed by using the following property:
|
||||||
|
|
||||||
|
test.relaxTiming=true
|
||||||
|
|
||||||
|
10. It is known that some platforms (e.g. OSX El Capitan) require IPv4 to
|
||||||
|
be the default for the multicast tests to work. This is configured by
|
||||||
|
the following property:
|
||||||
|
|
||||||
|
java.net.preferIPv4Stack=true
|
||||||
|
|
||||||
|
11. By default the output of unit tests is sent to the console and can be
|
||||||
|
quite verbose. The output can be deactivated by setting the property:
|
||||||
|
|
||||||
|
test.verbose=false
|
||||||
|
|
||||||
|
(8) Source code checks
|
||||||
|
|
||||||
|
(8.1) Checkstyle
|
||||||
|
|
||||||
|
NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat
|
||||||
|
build is optional and is off by default.
|
||||||
|
|
||||||
|
See http://checkstyle.sourceforge.net/ for more information.
|
||||||
|
|
||||||
|
Tomcat comes with a Checkstyle configuration that tests its source code
|
||||||
|
for certain conventions, like presence of the license header.
|
||||||
|
|
||||||
|
To enable Checkstyle, add the following property to build.properties file:
|
||||||
|
|
||||||
|
execute.validate=true
|
||||||
|
|
||||||
|
Once Checkstyle is enabled, the check will be performed automatically
|
||||||
|
during the build. The check is run before compilation of the source code.
|
||||||
|
|
||||||
|
To speed-up repeated runs of this check, a cache is configured. The cache
|
||||||
|
is located in the following directory:
|
||||||
|
|
||||||
|
output/res/checkstyle
|
||||||
|
|
||||||
|
It is possible to run the check separately by calling the "validate"
|
||||||
|
target. The command is:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant -Dexecute.validate=true validate
|
||||||
|
|
||||||
|
|
||||||
|
(8.2) SpotBugs
|
||||||
|
|
||||||
|
NOTE: SpotBugs is licensed under LGPL. Using SpotBugs during Tomcat build is
|
||||||
|
optional and is off by default.
|
||||||
|
|
||||||
|
See https://spotbugs.github.io/ for more information.
|
||||||
|
|
||||||
|
To enable SpotBugs, add the following property to build.properties file:
|
||||||
|
|
||||||
|
execute.spotbugs=true
|
||||||
|
|
||||||
|
To compile Tomcat classes and generate a SpotBugs report, call the
|
||||||
|
"spotbugs" target. For example:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant -Dexecute.spotbugs=true spotbugs
|
||||||
|
|
||||||
|
The report file by default is written to
|
||||||
|
|
||||||
|
output/spotbugs
|
||||||
|
|
||||||
|
|
||||||
|
(8.3) End-of-line conventions check
|
||||||
|
|
||||||
|
You usually would not need to run this check. You can skip this section.
|
||||||
|
|
||||||
|
Apache Tomcat project has convention that all of its textual source files,
|
||||||
|
stored in the Git repository, use Unix style LF line endings.
|
||||||
|
|
||||||
|
This test is used by developers to check that the source code adheres to
|
||||||
|
this convention. It verifies that the ends of lines in textual files are
|
||||||
|
appropriate. The idea is to run this check regularly and notify developers
|
||||||
|
when an inconsistency is detected.
|
||||||
|
|
||||||
|
The command to run this test is:
|
||||||
|
|
||||||
|
cd ${tomcat.source}
|
||||||
|
ant validate-eoln
|
164
apache-tomcat-9.0.109/CONTRIBUTING.md
Normal file
164
apache-tomcat-9.0.109/CONTRIBUTING.md
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
# Contributing to Apache Tomcat
|
||||||
|
|
||||||
|
Firstly, thanks for your interest in contributing! I hope that this will be a
|
||||||
|
pleasant experience for you, and that you will return to continue
|
||||||
|
contributing.
|
||||||
|
|
||||||
|
Please visit our [Get Involved page](https://tomcat.apache.org/getinvolved.html)
|
||||||
|
for more information on how to contribute.
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
This project and everyone participating in it are governed by the Apache
|
||||||
|
software Foundation's
|
||||||
|
[Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). By
|
||||||
|
participating, you are expected to adhere to this code. If you are aware of
|
||||||
|
unacceptable behavior, please visit the
|
||||||
|
[Reporting Guidelines page](https://www.apache.org/foundation/policies/conduct.html#reporting-guidelines)
|
||||||
|
and follow the instructions there.
|
||||||
|
|
||||||
|
## How Can I Contribute?
|
||||||
|
|
||||||
|
Most of the contributions that we receive are code contributions, but you can
|
||||||
|
also contribute to the documentation, wiki, etc., or simply report solid bugs
|
||||||
|
for us to fix.
|
||||||
|
|
||||||
|
### Reporting Bugs
|
||||||
|
|
||||||
|
Please review our [guide](https://tomcat.apache.org/bugreport.html) on how to
|
||||||
|
submit a bug report. This page also has links to other resources to assist
|
||||||
|
you.
|
||||||
|
|
||||||
|
### Reporting Translation improvements
|
||||||
|
|
||||||
|
Apache Tomcat project uses POEditor for managing the localization files.
|
||||||
|
Please see more at https://cwiki.apache.org/confluence/x/vIPzBQ
|
||||||
|
|
||||||
|
### Your First Code Contribution
|
||||||
|
|
||||||
|
### Trouble Deciding How to Contribute?
|
||||||
|
|
||||||
|
Unsure where to begin contributing to Tomcat? You can start by taking a look at
|
||||||
|
the issues marked 'Beginner', link below. Please note that the Beginner keyword
|
||||||
|
is pretty new to the project, so if there aren't any issues in the filter feel
|
||||||
|
free to ask on the [dev list](https://tomcat.apache.org/lists.html#tomcat-dev).
|
||||||
|
|
||||||
|
* [Beginner issues](https://bz.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&keywords=Beginner&keywords_type=allwords&list_id=160824&product=Tomcat%207&product=Tomcat%208.5&product=Tomcat%209&query_format=advanced) -
|
||||||
|
issues which should only require a few lines of code, and a test or two to
|
||||||
|
resolve.
|
||||||
|
|
||||||
|
The list above shows all bugs that are marked 'Beginner' and are open in the
|
||||||
|
currently supported Tomcat versions (9.0, 10.1, 11.0 and 12.0).
|
||||||
|
|
||||||
|
If you prefer C over Java, you may also take a look at the tomcat-native and
|
||||||
|
Tomcat Connectors products in Bugzilla.
|
||||||
|
|
||||||
|
### How to Provide Your First Patch
|
||||||
|
|
||||||
|
Excited yet? This section will guide you through providing a patch to the
|
||||||
|
committers of the project for review and acceptance.
|
||||||
|
|
||||||
|
##### Choose Your Method of Submission
|
||||||
|
|
||||||
|
You can provide a patch in one of the following ways (in order of preference):
|
||||||
|
|
||||||
|
* GitHub Pull Request
|
||||||
|
* Patch attachment to the Bugzilla issue
|
||||||
|
* Email the patch to the developer list. This is not preferred, but if no bug
|
||||||
|
is associated with the patch, or you would like a developer review, an email
|
||||||
|
may be appropriate.
|
||||||
|
|
||||||
|
##### Get the Sources
|
||||||
|
|
||||||
|
Now that you've chosen how you want to submit a patch, you need to get the
|
||||||
|
source code.
|
||||||
|
|
||||||
|
###### Download The Source Distribution
|
||||||
|
|
||||||
|
This method works if you want to submit a patch via email, but
|
||||||
|
the difference in using the sources distribution and a VCS is that you have to
|
||||||
|
manually generate the patch file by using diff. If this is what you want, you
|
||||||
|
can download the sources from the "Source Code Distributions" section of the
|
||||||
|
Download Page. There is one such page for every major Tomcat version:
|
||||||
|
|
||||||
|
- [Tomcat 11](https://tomcat.apache.org/download-11.cgi)
|
||||||
|
- [Tomcat 10](https://tomcat.apache.org/download-10.cgi)
|
||||||
|
- [Tomcat 9](https://tomcat.apache.org/download-90.cgi)
|
||||||
|
|
||||||
|
##### Manual Patch Generation
|
||||||
|
|
||||||
|
If you have chosen to attach a patch to the Bugzilla issue (or email
|
||||||
|
one), then you'll need to download the sources as noted above, make your
|
||||||
|
desired changes and then manually generate your patch using diff (or any
|
||||||
|
other tool).
|
||||||
|
|
||||||
|
##### GitHub
|
||||||
|
|
||||||
|
To submit a GitHub Pull Request you'll need to fork the
|
||||||
|
[repository](https://github.com/apache/tomcat), clone your fork to do the work:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git clone https://github.com/$USERNAME/tomcat.git
|
||||||
|
```
|
||||||
|
|
||||||
|
and then push your changes, and submit a Pull Request via the GitHub UI.
|
||||||
|
|
||||||
|
#### Submitting Your Patch!
|
||||||
|
|
||||||
|
After you've chosen your method of submission, retrieved the sources, and
|
||||||
|
fixed the issue it's time to submit your work. At this point, just follow
|
||||||
|
the method of submission you chose earlier.
|
||||||
|
|
||||||
|
* GitHub PR - after resolving the issue in your local fork and pushing to your
|
||||||
|
copy of the repository, open a GitHub PR for review.
|
||||||
|
* Bugzilla attachment - attach the patch to the Bugzilla issue
|
||||||
|
* Email - again, not preferred, but you may send an email to the developer list
|
||||||
|
with a patch attached for review.
|
||||||
|
|
||||||
|
#### Waiting For Feedback
|
||||||
|
|
||||||
|
It may take a while for committers to review. Please be patient during this
|
||||||
|
time as all committers are volunteers on the project. If a significant amount
|
||||||
|
of time has lapsed since your submission, such as a couple of months, feel free
|
||||||
|
to either update your BZ, PR, or email the dev list with a message to bump your
|
||||||
|
issue. Sometimes things get lost in all the work and we need a reminder :smile:
|
||||||
|
|
||||||
|
## IDE Support
|
||||||
|
|
||||||
|
Special IDE support for
|
||||||
|
[Eclipse](https://www.eclipse.org/ide/),
|
||||||
|
[IntelliJ IDEA](https://www.jetbrains.com/idea/) and
|
||||||
|
[NetBeans](https://netbeans.org/)
|
||||||
|
is provided through special ant targets:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ant ide-eclipse
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
ant ide-intellij
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
ant ide-netbeans
|
||||||
|
```
|
||||||
|
|
||||||
|
Just execute the ant target for your IDE after checking out the sources
|
||||||
|
to set up the appropriate configuration files.
|
||||||
|
Also make sure to re-execute the target after switching branches or
|
||||||
|
after pulling upstream changes in order to keep your IDE configurations in sync.
|
||||||
|
|
||||||
|
## Style Guide
|
||||||
|
|
||||||
|
Apache Tomcat has very loosely defined coding conventions, but the following
|
||||||
|
guidelines will be useful:
|
||||||
|
|
||||||
|
* Use spaces for indenting, not tabs
|
||||||
|
* 100 char line width for Java source, 80 char line width for documentation
|
||||||
|
source (.txt, .xml)
|
||||||
|
* Java source: { at end of line, 4 space indents
|
||||||
|
* XML source: 2 space indents
|
||||||
|
|
||||||
|
## Did we miss something?
|
||||||
|
|
||||||
|
Have you reviewed this guide and found it lacking? Or are you confused about
|
||||||
|
some particular step? If so, please let us know! Or better yet, submit a PR to
|
||||||
|
address the issue :wink:
|
1061
apache-tomcat-9.0.109/LICENSE
Normal file
1061
apache-tomcat-9.0.109/LICENSE
Normal file
File diff suppressed because it is too large
Load Diff
68
apache-tomcat-9.0.109/NOTICE
Normal file
68
apache-tomcat-9.0.109/NOTICE
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
Apache Tomcat
|
||||||
|
Copyright 1999-2025 The Apache Software Foundation
|
||||||
|
|
||||||
|
This product includes software developed at
|
||||||
|
The Apache Software Foundation (https://www.apache.org/).
|
||||||
|
|
||||||
|
This software contains code derived from netty-native
|
||||||
|
developed by the Netty project
|
||||||
|
(https://netty.io, https://github.com/netty/netty-tcnative/)
|
||||||
|
and from finagle-native developed at Twitter
|
||||||
|
(https://github.com/twitter/finagle).
|
||||||
|
|
||||||
|
This software contains code derived from jgroups-kubernetes
|
||||||
|
developed by the JGroups project (http://www.jgroups.org/).
|
||||||
|
|
||||||
|
The Windows Installer is built with the Nullsoft
|
||||||
|
Scriptable Install System (NSIS), which is
|
||||||
|
open source software. The original software and
|
||||||
|
related information is available at
|
||||||
|
http://nsis.sourceforge.net.
|
||||||
|
|
||||||
|
Java compilation software for JSP pages is provided by the Eclipse
|
||||||
|
JDT Core Batch Compiler component, which is open source software.
|
||||||
|
The original software and related information is available at
|
||||||
|
https://www.eclipse.org/jdt/core/.
|
||||||
|
|
||||||
|
org.apache.tomcat.util.json.JSONParser.jj is a public domain javacc grammar
|
||||||
|
for JSON written by Robert Fischer.
|
||||||
|
https://github.com/RobertFischer/json-parser
|
||||||
|
|
||||||
|
For portions of the Tomcat JNI OpenSSL API and the OpenSSL JSSE integration
|
||||||
|
The org.apache.tomcat.jni and the org.apache.tomcat.net.openssl packages
|
||||||
|
are derivative work originating from the Netty project and the finagle-native
|
||||||
|
project developed at Twitter
|
||||||
|
* Copyright 2014 The Netty Project
|
||||||
|
* Copyright 2014 Twitter
|
||||||
|
|
||||||
|
For portions of the Tomcat cloud support
|
||||||
|
The org.apache.catalina.tribes.membership.cloud package contains derivative
|
||||||
|
work originating from the jgroups project.
|
||||||
|
https://github.com/jgroups-extras/jgroups-kubernetes
|
||||||
|
Copyright 2002-2018 Red Hat Inc.
|
||||||
|
|
||||||
|
The original XML Schemas for Java EE Deployment Descriptors:
|
||||||
|
- javaee_5.xsd
|
||||||
|
- javaee_web_services_1_2.xsd
|
||||||
|
- javaee_web_services_client_1_2.xsd
|
||||||
|
- javaee_6.xsd
|
||||||
|
- javaee_web_services_1_3.xsd
|
||||||
|
- javaee_web_services_client_1_3.xsd
|
||||||
|
- jsp_2_2.xsd
|
||||||
|
- web-app_3_0.xsd
|
||||||
|
- web-common_3_0.xsd
|
||||||
|
- web-fragment_3_0.xsd
|
||||||
|
- javaee_7.xsd
|
||||||
|
- javaee_web_services_1_4.xsd
|
||||||
|
- javaee_web_services_client_1_4.xsd
|
||||||
|
- jsp_2_3.xsd
|
||||||
|
- web-app_3_1.xsd
|
||||||
|
- web-common_3_1.xsd
|
||||||
|
- web-fragment_3_1.xsd
|
||||||
|
- javaee_8.xsd
|
||||||
|
- web-app_4_0.xsd
|
||||||
|
- web-common_4_0.xsd
|
||||||
|
- web-fragment_4_0.xsd
|
||||||
|
|
||||||
|
may be obtained from:
|
||||||
|
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html
|
79
apache-tomcat-9.0.109/README.md
Normal file
79
apache-tomcat-9.0.109/README.md
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
## Welcome to Apache Tomcat!
|
||||||
|
|
||||||
|
### What Is It?
|
||||||
|
|
||||||
|
The Apache Tomcat® software is an open source implementation of the Java
|
||||||
|
Servlet, JavaServer Pages, Java Expression Language and Java WebSocket
|
||||||
|
technologies. The Java Servlet, JavaServer Pages, Java Expression Language and
|
||||||
|
Java WebSocket specifications are developed under the
|
||||||
|
[Java Community Process](https://jcp.org/en/introduction/overview).
|
||||||
|
|
||||||
|
The Apache Tomcat software is developed in an open and participatory
|
||||||
|
environment and released under the
|
||||||
|
[Apache License version 2](https://www.apache.org/licenses/). The Apache Tomcat
|
||||||
|
project is intended to be a collaboration of the best-of-breed developers from
|
||||||
|
around the world. We invite you to participate in this open development
|
||||||
|
project. To learn more about getting involved,
|
||||||
|
[click here](https://tomcat.apache.org/getinvolved.html) or keep reading.
|
||||||
|
|
||||||
|
Apache Tomcat software powers numerous large-scale, mission-critical web
|
||||||
|
applications across a diverse range of industries and organizations. Some of
|
||||||
|
these users and their stories are listed on the
|
||||||
|
[PoweredBy wiki page](https://cwiki.apache.org/confluence/display/TOMCAT/PoweredBy).
|
||||||
|
|
||||||
|
Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat
|
||||||
|
project logo are trademarks of the Apache Software Foundation.
|
||||||
|
|
||||||
|
### Get It
|
||||||
|
|
||||||
|
For every major Tomcat version there is one download page containing
|
||||||
|
links to the latest binary and source code downloads, but also
|
||||||
|
links for browsing the download directories and archives:
|
||||||
|
- [Tomcat 11](https://tomcat.apache.org/download-11.cgi)
|
||||||
|
- [Tomcat 10](https://tomcat.apache.org/download-10.cgi)
|
||||||
|
- [Tomcat 9](https://tomcat.apache.org/download-90.cgi)
|
||||||
|
|
||||||
|
To facilitate choosing the right major Tomcat version one, we have provided a
|
||||||
|
[version overview page](https://tomcat.apache.org/whichversion.html).
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
The documentation available as of the date of this release is
|
||||||
|
included in the docs webapp which ships with tomcat. You can access that webapp
|
||||||
|
by starting tomcat and visiting <http://localhost:8080/docs/> in your browser.
|
||||||
|
The most up-to-date documentation for each version can be found at:
|
||||||
|
- [Tomcat 11](https://tomcat.apache.org/tomcat-11.0-doc/)
|
||||||
|
- [Tomcat 10](https://tomcat.apache.org/tomcat-10.1-doc/)
|
||||||
|
- [Tomcat 9](https://tomcat.apache.org/tomcat-9.0-doc/)
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
Please see [RUNNING.txt](RUNNING.txt) for more info.
|
||||||
|
|
||||||
|
### Licensing
|
||||||
|
|
||||||
|
Please see [LICENSE](LICENSE) for more info.
|
||||||
|
|
||||||
|
### Support and Mailing List Information
|
||||||
|
|
||||||
|
* Free community support is available through the
|
||||||
|
[tomcat-users](https://tomcat.apache.org/lists.html#tomcat-users) email list and
|
||||||
|
a dedicated [IRC channel](https://tomcat.apache.org/irc.html) (#tomcat on
|
||||||
|
Freenode).
|
||||||
|
|
||||||
|
* If you want freely available support for running Apache Tomcat, please see the
|
||||||
|
resources page [here](https://tomcat.apache.org/findhelp.html).
|
||||||
|
|
||||||
|
* If you want to be informed about new code releases, bug fixes,
|
||||||
|
security fixes, general news and information about Apache Tomcat, please
|
||||||
|
subscribe to the
|
||||||
|
[tomcat-announce](https://tomcat.apache.org/lists.html#tomcat-announce) email
|
||||||
|
list.
|
||||||
|
|
||||||
|
* If you have a concrete bug report for Apache Tomcat, please see the
|
||||||
|
instructions for reporting a bug
|
||||||
|
[here](https://tomcat.apache.org/bugreport.html).
|
||||||
|
|
||||||
|
### Contributing
|
||||||
|
|
||||||
|
Please see [CONTRIBUTING](CONTRIBUTING.md) for more info.
|
174
apache-tomcat-9.0.109/RELEASE-NOTES
Normal file
174
apache-tomcat-9.0.109/RELEASE-NOTES
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
================================================================================
|
||||||
|
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.
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
Apache Tomcat Version 9.0.109
|
||||||
|
Release Notes
|
||||||
|
|
||||||
|
|
||||||
|
=========
|
||||||
|
CONTENTS:
|
||||||
|
=========
|
||||||
|
|
||||||
|
* Dependency Changes
|
||||||
|
* API Stability
|
||||||
|
* Bundled APIs
|
||||||
|
* Web application reloading and static fields in shared libraries
|
||||||
|
* Security manager URLs
|
||||||
|
* Symlinking static resources
|
||||||
|
* Viewing the Tomcat Change Log
|
||||||
|
* Cryptographic software notice
|
||||||
|
* When all else fails
|
||||||
|
|
||||||
|
|
||||||
|
===================
|
||||||
|
Dependency Changes:
|
||||||
|
===================
|
||||||
|
Tomcat 9.0 is designed to run on Java 8 and later.
|
||||||
|
|
||||||
|
|
||||||
|
==============
|
||||||
|
API Stability:
|
||||||
|
==============
|
||||||
|
|
||||||
|
The public interfaces for the following classes are fixed and will not be
|
||||||
|
changed at all during the remaining lifetime of the 9.x series:
|
||||||
|
- All classes in the javax namespace
|
||||||
|
|
||||||
|
The public interfaces for the following classes may be added to in order to
|
||||||
|
resolve bugs and/or add new features. No existing interface method will be
|
||||||
|
removed or changed although it may be deprecated.
|
||||||
|
- org.apache.catalina.* (excluding sub-packages)
|
||||||
|
|
||||||
|
Note: As Tomcat 9 matures, the above list will be added to. The list is not
|
||||||
|
considered complete at this time.
|
||||||
|
|
||||||
|
The remaining classes are considered part of the Tomcat internals and may change
|
||||||
|
without notice between point releases.
|
||||||
|
|
||||||
|
|
||||||
|
=============
|
||||||
|
Bundled APIs:
|
||||||
|
=============
|
||||||
|
A standard installation of Tomcat 9.0 makes all of the following APIs available
|
||||||
|
for use by web applications (by placing them in "lib"):
|
||||||
|
* annotations-api.jar (Annotations package)
|
||||||
|
* catalina.jar (Tomcat Catalina implementation)
|
||||||
|
* catalina-ant.jar (Tomcat Catalina Ant tasks)
|
||||||
|
* catalina-ha.jar (High availability package)
|
||||||
|
* catalina-ssi.jar (Server-side Includes module)
|
||||||
|
* catalina-storeconfig.jar (Generation of XML configuration from current state)
|
||||||
|
* catalina-tribes.jar (Group communication)
|
||||||
|
* ecj-4.20.jar (Eclipse JDT Java compiler)
|
||||||
|
* el-api.jar (EL 3.0 API)
|
||||||
|
* jasper.jar (Jasper 2 Compiler and Runtime)
|
||||||
|
* jasper-el.jar (Jasper 2 EL implementation)
|
||||||
|
* jsp-api.jar (JSP 2.3 API)
|
||||||
|
* servlet-api.jar (Servlet 4.0 API)
|
||||||
|
* tomcat-api.jar (Interfaces shared by Catalina and Jasper)
|
||||||
|
* tomcat-coyote.jar (Tomcat connectors and utility classes)
|
||||||
|
* tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP 2)
|
||||||
|
* tomcat-jdbc.jar (Tomcat's database connection pooling solution)
|
||||||
|
* tomcat-jni.jar (Interface to the native component of the APR/native connector)
|
||||||
|
* tomcat-util.jar (Various utilities)
|
||||||
|
* tomcat-websocket.jar (WebSocket 1.1 implementation)
|
||||||
|
* websocket-api.jar (WebSocket 1.1 API)
|
||||||
|
|
||||||
|
You can make additional APIs available to all of your web applications by
|
||||||
|
putting unpacked classes into a "classes" directory (not created by default),
|
||||||
|
or by placing them in JAR files in the "lib" directory.
|
||||||
|
|
||||||
|
To override the XML parser implementation or interfaces, use the appropriate
|
||||||
|
feature for your JVM. For Java <= 8 use the endorsed standards override
|
||||||
|
feature. The default configuration defines JARs located in "endorsed" as endorsed.
|
||||||
|
For Java 9+ use the upgradeable modules feature.
|
||||||
|
|
||||||
|
|
||||||
|
================================================================
|
||||||
|
Web application reloading and static fields in shared libraries:
|
||||||
|
================================================================
|
||||||
|
Some shared libraries (many are part of the JDK) keep references to objects
|
||||||
|
instantiated by the web application. To avoid class loading related problems
|
||||||
|
(ClassCastExceptions, messages indicating that the classloader
|
||||||
|
is stopped, etc.), the shared libraries state should be reinitialized.
|
||||||
|
|
||||||
|
Something which might help is to avoid putting classes which would be
|
||||||
|
referenced by a shared static field in the web application classloader,
|
||||||
|
and putting them in the shared classloader instead (JARs should be put in the
|
||||||
|
"lib" folder, and classes should be put in the "classes" folder).
|
||||||
|
|
||||||
|
|
||||||
|
======================
|
||||||
|
Security manager URLs:
|
||||||
|
======================
|
||||||
|
In order to grant security permissions to JARs located inside the
|
||||||
|
web application repository, use URLs of the following format
|
||||||
|
in your policy file:
|
||||||
|
|
||||||
|
file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar
|
||||||
|
|
||||||
|
|
||||||
|
============================
|
||||||
|
Symlinking static resources:
|
||||||
|
============================
|
||||||
|
By default, Unix symlinks will not work when used in a web application to link
|
||||||
|
resources located outside the web application root directory.
|
||||||
|
|
||||||
|
This behavior is optional, and the "allowLinking" flag may be used to deactivate
|
||||||
|
the check.
|
||||||
|
|
||||||
|
|
||||||
|
==============================
|
||||||
|
Viewing the Tomcat Change Log:
|
||||||
|
==============================
|
||||||
|
The full change log is available from https://tomcat.apache.org and is also
|
||||||
|
included in the documentation web application.
|
||||||
|
|
||||||
|
|
||||||
|
=============================
|
||||||
|
Cryptographic software notice
|
||||||
|
=============================
|
||||||
|
This distribution includes cryptographic software. The country in
|
||||||
|
which you currently reside may have restrictions on the import,
|
||||||
|
possession, use, and/or re-export to another country, of
|
||||||
|
encryption software. BEFORE using any encryption software, please
|
||||||
|
check your country's laws, regulations and policies concerning the
|
||||||
|
import, possession, or use, and re-export of encryption software, to
|
||||||
|
see if this is permitted. See <http://www.wassenaar.org/> for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
The U.S. Government Department of Commerce, Bureau of Industry and
|
||||||
|
Security (BIS), has classified this software as Export Commodity
|
||||||
|
Control Number (ECCN) 5D002.C.1, which includes information security
|
||||||
|
software using or performing cryptographic functions with asymmetric
|
||||||
|
algorithms. The form and manner of this Apache Software Foundation
|
||||||
|
distribution makes it eligible for export under the License Exception
|
||||||
|
ENC Technology Software Unrestricted (TSU) exception (see the BIS
|
||||||
|
Export Administration Regulations, Section 740.13) for both object
|
||||||
|
code and source code.
|
||||||
|
|
||||||
|
The following provides more details on the included cryptographic
|
||||||
|
software:
|
||||||
|
- Tomcat includes code designed to work with JSSE
|
||||||
|
- Tomcat includes code designed to work with OpenSSL
|
||||||
|
|
||||||
|
|
||||||
|
====================
|
||||||
|
When all else fails:
|
||||||
|
====================
|
||||||
|
See the FAQ
|
||||||
|
https://tomcat.apache.org/faq/
|
478
apache-tomcat-9.0.109/RUNNING.txt
Normal file
478
apache-tomcat-9.0.109/RUNNING.txt
Normal file
@ -0,0 +1,478 @@
|
|||||||
|
================================================================================
|
||||||
|
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.
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
===================================================
|
||||||
|
Running The Apache Tomcat 9.0 Servlet/JSP Container
|
||||||
|
===================================================
|
||||||
|
|
||||||
|
Apache Tomcat 9.0 requires a Java Standard Edition Runtime
|
||||||
|
Environment (JRE) version 8 or later.
|
||||||
|
|
||||||
|
=============================
|
||||||
|
Running With JRE 8 Or Later
|
||||||
|
=============================
|
||||||
|
|
||||||
|
(1) Download and Install a Java SE Runtime Environment (JRE)
|
||||||
|
|
||||||
|
(1.1) Download a Java SE Runtime Environment (JRE),
|
||||||
|
release version 8 or later, from
|
||||||
|
http://www.oracle.com/technetwork/java/javase/downloads/index.html
|
||||||
|
|
||||||
|
(1.2) Install the JRE according to the instructions included with the
|
||||||
|
release.
|
||||||
|
|
||||||
|
You may also use a full Java Development Kit (JDK) rather than just
|
||||||
|
a JRE.
|
||||||
|
|
||||||
|
|
||||||
|
(2) Download and Install Apache Tomcat
|
||||||
|
|
||||||
|
(2.1) Download a binary distribution of Tomcat from:
|
||||||
|
|
||||||
|
https://tomcat.apache.org/
|
||||||
|
|
||||||
|
(2.2) Unpack the binary distribution so that it resides in its own
|
||||||
|
directory (conventionally named "apache-tomcat-[version]").
|
||||||
|
|
||||||
|
For the purposes of the remainder of this document, the name
|
||||||
|
"CATALINA_HOME" is used to refer to the full pathname of that
|
||||||
|
directory.
|
||||||
|
|
||||||
|
NOTE: As an alternative to downloading a binary distribution, you can
|
||||||
|
create your own from the Tomcat source code, as described in
|
||||||
|
"BUILDING.txt". You can either
|
||||||
|
|
||||||
|
a) Do the full "release" build and find the created distribution in the
|
||||||
|
"output/release" directory and then proceed with unpacking as above, or
|
||||||
|
|
||||||
|
b) Do a simple build and use the "output/build" directory as
|
||||||
|
"CATALINA_HOME". Be warned that there are some differences between the
|
||||||
|
contents of the "output/build" directory and a full "release"
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
|
||||||
|
(3) Configure Environment Variables
|
||||||
|
|
||||||
|
Tomcat is a Java application and does not use environment variables directly.
|
||||||
|
Environment variables are used by the Tomcat startup scripts. The scripts use
|
||||||
|
the environment variables to prepare the command that starts Tomcat.
|
||||||
|
|
||||||
|
(3.1) Set CATALINA_HOME (required) and CATALINA_BASE (optional)
|
||||||
|
|
||||||
|
The CATALINA_HOME environment variable should be set to the location of the
|
||||||
|
root directory of the "binary" distribution of Tomcat.
|
||||||
|
|
||||||
|
The Tomcat startup scripts have some logic to set this variable
|
||||||
|
automatically if it is absent, based on the location of the startup script
|
||||||
|
in *nix and on the current directory in Windows. That logic might not work
|
||||||
|
in all circumstances, so setting the variable explicitly is recommended.
|
||||||
|
|
||||||
|
The CATALINA_BASE environment variable specifies location of the root
|
||||||
|
directory of the "active configuration" of Tomcat. It is optional. It
|
||||||
|
defaults to be equal to CATALINA_HOME.
|
||||||
|
|
||||||
|
Using distinct values for the CATALINA_HOME and CATALINA_BASE variables is
|
||||||
|
recommended to simplify further upgrades and maintenance. It is documented
|
||||||
|
in the "Multiple Tomcat Instances" section below.
|
||||||
|
|
||||||
|
|
||||||
|
(3.2) Set JRE_HOME or JAVA_HOME (required)
|
||||||
|
|
||||||
|
These variables are used to specify location of a Java Runtime
|
||||||
|
Environment or of a Java Development Kit that is used to start Tomcat.
|
||||||
|
|
||||||
|
The JRE_HOME variable is used to specify location of a JRE. The JAVA_HOME
|
||||||
|
variable is used to specify location of a JDK.
|
||||||
|
|
||||||
|
Using JAVA_HOME provides access to certain additional startup options that
|
||||||
|
are not allowed when JRE_HOME is used.
|
||||||
|
|
||||||
|
If both JRE_HOME and JAVA_HOME are specified, JRE_HOME is used.
|
||||||
|
|
||||||
|
The recommended place to specify these variables is a "setenv" script. See
|
||||||
|
below.
|
||||||
|
|
||||||
|
|
||||||
|
(3.3) Other variables (optional)
|
||||||
|
|
||||||
|
Other environment variables exist, besides the four described above.
|
||||||
|
See the comments at the top of catalina.bat or catalina.sh scripts for
|
||||||
|
the list and a description of each of them.
|
||||||
|
|
||||||
|
One frequently used variable is CATALINA_OPTS. It allows specification of
|
||||||
|
additional options for the java command that starts Tomcat.
|
||||||
|
|
||||||
|
See the Java documentation for the options that affect the Java Runtime
|
||||||
|
Environment.
|
||||||
|
|
||||||
|
See the "System Properties" page in the Tomcat Configuration Reference for
|
||||||
|
the system properties that are specific to Tomcat.
|
||||||
|
|
||||||
|
A similar variable is JAVA_OPTS. It is used less frequently. It allows
|
||||||
|
specification of options that are used both to start and to stop Tomcat as well
|
||||||
|
as for other commands.
|
||||||
|
|
||||||
|
Note: Do not use JAVA_OPTS to specify memory limits. You do not need much
|
||||||
|
memory for a small process that is used to stop Tomcat. Those settings
|
||||||
|
belong to CATALINA_OPTS.
|
||||||
|
|
||||||
|
Another frequently used variable is CATALINA_PID (on *nix only). It
|
||||||
|
specifies the location of the file where process id of the forked Tomcat
|
||||||
|
java process will be written. This setting is optional. It will activate
|
||||||
|
the following features:
|
||||||
|
|
||||||
|
* better protection against duplicate start attempts and
|
||||||
|
* allows forceful termination of Tomcat process when it does not react to
|
||||||
|
the standard shutdown command.
|
||||||
|
|
||||||
|
|
||||||
|
(3.4) Using the "setenv" script (optional, recommended)
|
||||||
|
|
||||||
|
Apart from CATALINA_HOME and CATALINA_BASE, all environment variables can
|
||||||
|
be specified in the "setenv" script. The script is placed either into
|
||||||
|
CATALINA_BASE/bin or into CATALINA_HOME/bin directory and is named
|
||||||
|
setenv.bat (on Windows) or setenv.sh (on *nix). The file has to be
|
||||||
|
readable.
|
||||||
|
|
||||||
|
By default the setenv script file is absent. If the script file is present
|
||||||
|
both in CATALINA_BASE and in CATALINA_HOME, the one in CATALINA_BASE is
|
||||||
|
preferred.
|
||||||
|
|
||||||
|
For example, to configure the JRE_HOME and CATALINA_PID variables you can
|
||||||
|
create the following script file:
|
||||||
|
|
||||||
|
On Windows, %CATALINA_BASE%\bin\setenv.bat:
|
||||||
|
|
||||||
|
set "JRE_HOME=%ProgramFiles%\Java\jre8"
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
|
On *nix, $CATALINA_BASE/bin/setenv.sh:
|
||||||
|
|
||||||
|
JRE_HOME=/usr/java/latest
|
||||||
|
CATALINA_PID="/run/tomcat.pid"
|
||||||
|
|
||||||
|
|
||||||
|
The CATALINA_HOME and CATALINA_BASE variables cannot be configured in the
|
||||||
|
setenv script, because they are used to locate that file.
|
||||||
|
|
||||||
|
All the environment variables described here and the "setenv" script are
|
||||||
|
used only if you use the standard scripts to launch Tomcat. For example, if
|
||||||
|
you have installed Tomcat as a service on Windows, the service wrapper
|
||||||
|
launches Java directly and does not use the script files.
|
||||||
|
|
||||||
|
|
||||||
|
(4) Start Up Tomcat
|
||||||
|
|
||||||
|
(4.1) Tomcat can be started by executing one of the following commands:
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
|
||||||
|
%CATALINA_HOME%\bin\startup.bat
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
%CATALINA_HOME%\bin\catalina.bat start
|
||||||
|
|
||||||
|
On *nix:
|
||||||
|
|
||||||
|
$CATALINA_HOME/bin/startup.sh
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
$CATALINA_HOME/bin/catalina.sh start
|
||||||
|
|
||||||
|
(4.2) After startup, the default web applications included with Tomcat will be
|
||||||
|
available by visiting:
|
||||||
|
|
||||||
|
http://localhost:8080/
|
||||||
|
|
||||||
|
(4.3) Further information about configuring and running Tomcat can be found in
|
||||||
|
the documentation included here, as well as on the Tomcat web site:
|
||||||
|
|
||||||
|
https://tomcat.apache.org/
|
||||||
|
|
||||||
|
|
||||||
|
(5) Shut Down Tomcat
|
||||||
|
|
||||||
|
(5.1) Tomcat can be shut down by executing one of the following commands:
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
|
||||||
|
%CATALINA_HOME%\bin\shutdown.bat
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
%CATALINA_HOME%\bin\catalina.bat stop
|
||||||
|
|
||||||
|
On *nix:
|
||||||
|
|
||||||
|
$CATALINA_HOME/bin/shutdown.sh
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
$CATALINA_HOME/bin/catalina.sh stop
|
||||||
|
|
||||||
|
==================================================
|
||||||
|
Advanced Configuration - Multiple Tomcat Instances
|
||||||
|
==================================================
|
||||||
|
|
||||||
|
In many circumstances, it is desirable to have a single copy of a Tomcat
|
||||||
|
binary distribution shared among multiple users on the same server. To make
|
||||||
|
this possible, you can set the CATALINA_BASE environment variable to the
|
||||||
|
directory that contains the files for your 'personal' Tomcat instance.
|
||||||
|
|
||||||
|
When running with a separate CATALINA_HOME and CATALINA_BASE, the files
|
||||||
|
and directories are split as following:
|
||||||
|
|
||||||
|
In CATALINA_BASE:
|
||||||
|
|
||||||
|
* bin - Only the following files:
|
||||||
|
|
||||||
|
* setenv.sh (*nix) or setenv.bat (Windows),
|
||||||
|
* tomcat-juli.jar
|
||||||
|
|
||||||
|
The setenv scripts were described above. The tomcat-juli library
|
||||||
|
is documented in the Logging chapter in the User Guide.
|
||||||
|
|
||||||
|
* conf - Server configuration files (typically all of them, including
|
||||||
|
server.xml)
|
||||||
|
|
||||||
|
* lib - Libraries and classes, as explained below
|
||||||
|
|
||||||
|
* logs - Log and output files
|
||||||
|
|
||||||
|
* webapps - Automatically loaded web applications
|
||||||
|
|
||||||
|
* work - Temporary working directories for web applications
|
||||||
|
|
||||||
|
* temp - Directory used by the JVM for temporary files (java.io.tmpdir)
|
||||||
|
|
||||||
|
|
||||||
|
In CATALINA_HOME:
|
||||||
|
|
||||||
|
* bin - Startup and shutdown scripts
|
||||||
|
|
||||||
|
The following files will be used only if they are absent in
|
||||||
|
CATALINA_BASE/bin:
|
||||||
|
|
||||||
|
setenv.sh (*nix), setenv.bat (Windows), tomcat-juli.jar
|
||||||
|
|
||||||
|
* lib - Libraries and classes, as explained below
|
||||||
|
|
||||||
|
* endorsed - Libraries that override standard "Endorsed Standards"
|
||||||
|
libraries provided by JRE. See Classloading documentation
|
||||||
|
in the User Guide for details.
|
||||||
|
This is only supported for Java <= 8.
|
||||||
|
By default this "endorsed" directory is absent.
|
||||||
|
|
||||||
|
In the default configuration the JAR libraries and classes both in
|
||||||
|
CATALINA_BASE/lib and in CATALINA_HOME/lib will be added to the common
|
||||||
|
classpath, but the ones in CATALINA_BASE will be added first and thus will
|
||||||
|
be searched first.
|
||||||
|
|
||||||
|
The idea is that you may leave the standard Tomcat libraries in
|
||||||
|
CATALINA_HOME/lib and add other ones such as database drivers into
|
||||||
|
CATALINA_BASE/lib.
|
||||||
|
|
||||||
|
In general it is advised to never share libraries between web applications,
|
||||||
|
but put them into WEB-INF/lib directories inside the applications. See
|
||||||
|
Classloading documentation in the User Guide for details.
|
||||||
|
|
||||||
|
|
||||||
|
It might be useful to note that the values of CATALINA_HOME and
|
||||||
|
CATALINA_BASE can be referenced in the XML configuration files processed
|
||||||
|
by Tomcat as ${catalina.home} and ${catalina.base} respectively.
|
||||||
|
|
||||||
|
For example, the standard manager web application can be kept in
|
||||||
|
CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
|
||||||
|
its deployment descriptor into the desired virtual host:
|
||||||
|
|
||||||
|
* Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
|
||||||
|
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml
|
||||||
|
|
||||||
|
* Add docBase attribute as shown below.
|
||||||
|
|
||||||
|
The file will look like the following:
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Context docBase="${catalina.home}/webapps/manager"
|
||||||
|
antiResourceLocking="false" privileged="true" >
|
||||||
|
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
|
||||||
|
allow="127\.0\.0\.1" />
|
||||||
|
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
|
||||||
|
</Context>
|
||||||
|
|
||||||
|
See Deployer chapter in User Guide and Context and Host chapters in the
|
||||||
|
Configuration Reference for more information on contexts and web
|
||||||
|
application deployment.
|
||||||
|
|
||||||
|
|
||||||
|
================
|
||||||
|
Troubleshooting
|
||||||
|
================
|
||||||
|
|
||||||
|
There are only really 2 things likely to go wrong during the stand-alone
|
||||||
|
Tomcat install:
|
||||||
|
|
||||||
|
(1) The most common hiccup is when another web server (or any process for that
|
||||||
|
matter) has laid claim to port 8080. This is the default HTTP port that
|
||||||
|
Tomcat attempts to bind to at startup. To change this, open the file:
|
||||||
|
|
||||||
|
$CATALINA_HOME/conf/server.xml
|
||||||
|
|
||||||
|
and search for '8080'. Change it to a port that isn't in use, and is
|
||||||
|
greater than 1024, as ports less than or equal to 1024 require superuser
|
||||||
|
access to bind under UNIX.
|
||||||
|
|
||||||
|
Restart Tomcat and you're in business. Be sure that you replace the "8080"
|
||||||
|
in the URL you're using to access Tomcat. For example, if you change the
|
||||||
|
port to 1977, you would request the URL http://localhost:1977/ in your
|
||||||
|
browser.
|
||||||
|
|
||||||
|
(2) The 'localhost' machine isn't found. This could happen if you're behind a
|
||||||
|
proxy. If that's the case, make sure the proxy configuration for your
|
||||||
|
browser knows that you shouldn't be going through the proxy to access the
|
||||||
|
"localhost".
|
||||||
|
|
||||||
|
In Firefox, this is under Tools/Preferences -> Advanced/Network ->
|
||||||
|
Connection -> Settings..., and in Internet Explorer it is Tools ->
|
||||||
|
Internet Options -> Connections -> LAN Settings.
|
||||||
|
|
||||||
|
|
||||||
|
====================
|
||||||
|
Optional Components
|
||||||
|
====================
|
||||||
|
|
||||||
|
The following optional components may be included with the Apache Tomcat binary
|
||||||
|
distribution. If they are not included, you can install them separately.
|
||||||
|
|
||||||
|
1. Apache Tomcat Native library
|
||||||
|
|
||||||
|
2. Apache Commons Daemon service launcher
|
||||||
|
|
||||||
|
Both of them are implemented in C language and as such have to be compiled
|
||||||
|
into binary code. The binary code will be specific for a platform and CPU
|
||||||
|
architecture and it must match the Java Runtime Environment executables
|
||||||
|
that will be used to launch Tomcat.
|
||||||
|
|
||||||
|
The Windows-specific binary distributions of Apache Tomcat include binary
|
||||||
|
files for these components. On other platforms you would have to look for
|
||||||
|
binary versions elsewhere or compile them yourself.
|
||||||
|
|
||||||
|
If you are new to Tomcat, do not bother with these components to start with.
|
||||||
|
If you do use them, do not forget to read their documentation.
|
||||||
|
|
||||||
|
|
||||||
|
Apache Tomcat Native library
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
It is a library that allows to use the "Apr" variant of HTTP and AJP
|
||||||
|
protocol connectors in Apache Tomcat. It is built around OpenSSL and Apache
|
||||||
|
Portable Runtime (APR) libraries. Those are the same libraries as used by
|
||||||
|
Apache HTTPD Server project.
|
||||||
|
|
||||||
|
This feature was especially important in the old days when Java performance
|
||||||
|
was poor. It is less important nowadays, but it is still used and respected
|
||||||
|
by many. See Tomcat documentation for more details.
|
||||||
|
|
||||||
|
For further reading:
|
||||||
|
|
||||||
|
- Apache Tomcat documentation
|
||||||
|
|
||||||
|
* Documentation for APR/Native library in the Tomcat User's Guide
|
||||||
|
|
||||||
|
https://tomcat.apache.org/tomcat-9.0-doc/apr.html
|
||||||
|
|
||||||
|
* Documentation for the HTTP and AJP protocol connectors in the Tomcat
|
||||||
|
Configuration Reference
|
||||||
|
|
||||||
|
https://tomcat.apache.org/tomcat-9.0-doc/config/http.html
|
||||||
|
|
||||||
|
https://tomcat.apache.org/tomcat-9.0-doc/config/ajp.html
|
||||||
|
|
||||||
|
- Apache Tomcat Native project home
|
||||||
|
|
||||||
|
https://tomcat.apache.org/native-doc/
|
||||||
|
|
||||||
|
- Other projects
|
||||||
|
|
||||||
|
* OpenSSL
|
||||||
|
|
||||||
|
https://www.openssl.org/
|
||||||
|
|
||||||
|
* Apache Portable Runtime
|
||||||
|
|
||||||
|
https://apr.apache.org/
|
||||||
|
|
||||||
|
* Apache HTTP Server
|
||||||
|
|
||||||
|
https://httpd.apache.org/
|
||||||
|
|
||||||
|
To deactivate Apache Tomcat Native library:
|
||||||
|
|
||||||
|
- To deactivate Apache Tomcat Native library when it is installed, or
|
||||||
|
- To remove the warning that is logged during Tomcat startup when the
|
||||||
|
library is not installed:
|
||||||
|
|
||||||
|
Edit the "conf/server.xml" file and remove "AprLifecycleListener" from
|
||||||
|
it.
|
||||||
|
|
||||||
|
The binary file of Apache Tomcat Native library is usually named
|
||||||
|
|
||||||
|
- "tcnative-1.dll" on Windows
|
||||||
|
- "libtcnative-1.so" on *nix systems
|
||||||
|
|
||||||
|
|
||||||
|
Apache Commons Daemon
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Apache Commons Daemon project provides wrappers that can be used to
|
||||||
|
install Apache Tomcat as a service on Windows or as a daemon on *nix
|
||||||
|
systems.
|
||||||
|
|
||||||
|
The Windows-specific implementation of Apache Commons Daemon is called
|
||||||
|
"procrun". The *nix-specific one is called "jsvc".
|
||||||
|
|
||||||
|
For further reading:
|
||||||
|
|
||||||
|
- Apache Commons Daemon project
|
||||||
|
|
||||||
|
https://commons.apache.org/daemon/
|
||||||
|
|
||||||
|
- Apache Tomcat documentation
|
||||||
|
|
||||||
|
* Installing Apache Tomcat
|
||||||
|
|
||||||
|
https://tomcat.apache.org/tomcat-9.0-doc/setup.html
|
||||||
|
|
||||||
|
* Windows Service How-To
|
||||||
|
|
||||||
|
https://tomcat.apache.org/tomcat-9.0-doc/windows-service-howto.html
|
||||||
|
|
||||||
|
The binary files of Apache Commons Daemon in Apache Tomcat distributions
|
||||||
|
for Windows are named:
|
||||||
|
|
||||||
|
- "tomcat9.exe"
|
||||||
|
- "tomcat9w.exe"
|
||||||
|
|
||||||
|
These files are renamed copies of "prunsrv.exe" and "prunmgr.exe" from
|
||||||
|
Apache Commons Daemon distribution. The file names have a meaning: they are
|
||||||
|
used as the service name to register the service in Windows, as well as the
|
||||||
|
key name to store distinct configuration for this installation of
|
||||||
|
"procrun". If you would like to install several instances of Tomcat 9.0
|
||||||
|
in parallel, you have to further rename those files, using the same naming
|
||||||
|
scheme.
|
BIN
apache-tomcat-9.0.109/bin/bootstrap.jar
Normal file
BIN
apache-tomcat-9.0.109/bin/bootstrap.jar
Normal file
Binary file not shown.
39
apache-tomcat-9.0.109/bin/catalina-tasks.xml
Normal file
39
apache-tomcat-9.0.109/bin/catalina-tasks.xml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
XML file for importing Catalina ant tasks.
|
||||||
|
<import file="${catalina.home}/bin/catalina-tasks.xml"/>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project name="catalina-tasks">
|
||||||
|
<description>Catalina Ant Manager, JMX and JSPC Tasks</description>
|
||||||
|
<!-- set catalina.home if it's not already set -->
|
||||||
|
<dirname property="catalina.home.bin.dir" file="${ant.file.catalina-tasks}"/>
|
||||||
|
<property name="catalina.home" value="${catalina.home.bin.dir}/.."/>
|
||||||
|
<typedef resource="org/apache/catalina/ant/catalina.tasks">
|
||||||
|
<classpath>
|
||||||
|
<fileset file="${catalina.home}/bin/tomcat-juli.jar"/>
|
||||||
|
<fileset dir="${catalina.home}/lib" includes="*.jar"/>
|
||||||
|
</classpath>
|
||||||
|
</typedef>
|
||||||
|
<typedef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks">
|
||||||
|
<classpath>
|
||||||
|
<fileset file="${catalina.home}/lib/catalina-ant.jar"/>
|
||||||
|
</classpath>
|
||||||
|
</typedef>
|
||||||
|
</project>
|
398
apache-tomcat-9.0.109/bin/catalina.bat
Normal file
398
apache-tomcat-9.0.109/bin/catalina.bat
Normal file
@ -0,0 +1,398 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Start/Stop Script for the CATALINA Server
|
||||||
|
rem
|
||||||
|
rem For supported commands call "catalina.bat help" or see the usage section
|
||||||
|
rem towards the end of this file.
|
||||||
|
rem
|
||||||
|
rem Environment Variable Prerequisites
|
||||||
|
rem
|
||||||
|
rem Do not set the variables in this script. Instead put them into a script
|
||||||
|
rem setenv.bat in CATALINA_BASE/bin to keep your customizations separate.
|
||||||
|
rem
|
||||||
|
rem WHEN RUNNING TOMCAT AS A WINDOWS SERVICE:
|
||||||
|
rem Note that the environment variables that affect the behavior of this
|
||||||
|
rem script will have no effect at all on Windows Services. As such, any
|
||||||
|
rem local customizations made in a CATALINA_BASE/bin/setenv.bat script
|
||||||
|
rem will also have no effect on Tomcat when launched as a Windows Service.
|
||||||
|
rem The configuration that controls Windows Services is stored in the Windows
|
||||||
|
rem Registry, and is most conveniently maintained using the "tomcat9w.exe"
|
||||||
|
rem maintenance utility.
|
||||||
|
rem
|
||||||
|
rem CATALINA_HOME May point at your Catalina "build" directory.
|
||||||
|
rem
|
||||||
|
rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions
|
||||||
|
rem of a Catalina installation. If not present, resolves to
|
||||||
|
rem the same directory that CATALINA_HOME points to.
|
||||||
|
rem
|
||||||
|
rem CATALINA_OPTS (Optional) Java runtime options used when the "start",
|
||||||
|
rem "run" or "debug" command is executed.
|
||||||
|
rem Include here and not in JAVA_OPTS all options, that should
|
||||||
|
rem only be used by Tomcat itself, not by the stop process,
|
||||||
|
rem the version command etc.
|
||||||
|
rem Examples are heap size, GC logging, JMX ports etc.
|
||||||
|
rem
|
||||||
|
rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory
|
||||||
|
rem the JVM should use (java.io.tmpdir). Defaults to
|
||||||
|
rem %CATALINA_BASE%\temp.
|
||||||
|
rem
|
||||||
|
rem JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
rem Required to run the with the "debug" argument.
|
||||||
|
rem
|
||||||
|
rem JRE_HOME Must point at your Java Runtime installation.
|
||||||
|
rem Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
|
||||||
|
rem are both set, JRE_HOME is used.
|
||||||
|
rem
|
||||||
|
rem JAVA_OPTS (Optional) Java runtime options used when any command
|
||||||
|
rem is executed.
|
||||||
|
rem Include here and not in CATALINA_OPTS all options, that
|
||||||
|
rem should be used by Tomcat and also by the stop process,
|
||||||
|
rem the version command etc.
|
||||||
|
rem Most options should go into CATALINA_OPTS.
|
||||||
|
rem
|
||||||
|
rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories
|
||||||
|
rem containing some jars in order to allow replacement of APIs
|
||||||
|
rem created outside of the JCP (i.e. DOM and SAX from W3C).
|
||||||
|
rem It can also be used to update the XML parser implementation.
|
||||||
|
rem This is only supported for Java <= 8.
|
||||||
|
rem Defaults to $CATALINA_HOME/endorsed.
|
||||||
|
rem
|
||||||
|
rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
|
||||||
|
rem command is executed. The default is "dt_socket".
|
||||||
|
rem
|
||||||
|
rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
|
||||||
|
rem command is executed. The default is localhost:8000.
|
||||||
|
rem
|
||||||
|
rem JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
|
||||||
|
rem command is executed. Specifies whether JVM should suspend
|
||||||
|
rem execution immediately after startup. Default is "n".
|
||||||
|
rem
|
||||||
|
rem JPDA_OPTS (Optional) Java runtime options used when the "jpda start"
|
||||||
|
rem command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS,
|
||||||
|
rem and JPDA_SUSPEND are ignored. Thus, all required jpda
|
||||||
|
rem options MUST be specified. The default is:
|
||||||
|
rem
|
||||||
|
rem -agentlib:jdwp=transport=%JPDA_TRANSPORT%,
|
||||||
|
rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
|
||||||
|
rem
|
||||||
|
rem JSSE_OPTS (Optional) Java runtime options used to control the TLS
|
||||||
|
rem implementation when JSSE is used. Default is:
|
||||||
|
rem "-Djdk.tls.ephemeralDHKeySize=2048"
|
||||||
|
rem
|
||||||
|
rem CATALINA_LOGGING_CONFIG (Optional) Override Tomcat's logging config file
|
||||||
|
rem Example (all one line)
|
||||||
|
rem set CATALINA_LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
|
||||||
|
rem
|
||||||
|
rem LOGGING_CONFIG Deprecated
|
||||||
|
rem Use CATALINA_LOGGING_CONFIG
|
||||||
|
rem This is only used if CATALINA_LOGGING_CONFIG is not set
|
||||||
|
rem and LOGGING_CONFIG starts with "-D..."
|
||||||
|
rem
|
||||||
|
rem LOGGING_MANAGER (Optional) Override Tomcat's logging manager
|
||||||
|
rem Example (all one line)
|
||||||
|
rem set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||||
|
rem
|
||||||
|
rem TITLE (Optional) Specify the title of Tomcat window. The default
|
||||||
|
rem TITLE is Tomcat if it's not specified.
|
||||||
|
rem Example (all one line)
|
||||||
|
rem set TITLE=Tomcat.Cluster#1.Server#1 [%DATE% %TIME%]
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Suppress Terminate batch job on CTRL+C
|
||||||
|
if not ""%1"" == ""run"" goto mainEntry
|
||||||
|
if "%TEMP%" == "" goto mainEntry
|
||||||
|
if exist "%TEMP%\%~nx0.run" goto mainEntry
|
||||||
|
echo Y>"%TEMP%\%~nx0.run"
|
||||||
|
if not exist "%TEMP%\%~nx0.run" goto mainEntry
|
||||||
|
echo Y>"%TEMP%\%~nx0.Y"
|
||||||
|
call "%~f0" %* <"%TEMP%\%~nx0.Y"
|
||||||
|
rem Use provided errorlevel
|
||||||
|
set RETVAL=%ERRORLEVEL%
|
||||||
|
del /Q "%TEMP%\%~nx0.Y" >NUL 2>&1
|
||||||
|
exit /B %RETVAL%
|
||||||
|
:mainEntry
|
||||||
|
del /Q "%TEMP%\%~nx0.run" >NUL 2>&1
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
rem Copy CATALINA_BASE from CATALINA_HOME if not defined
|
||||||
|
if not "%CATALINA_BASE%" == "" goto gotBase
|
||||||
|
set "CATALINA_BASE=%CATALINA_HOME%"
|
||||||
|
:gotBase
|
||||||
|
|
||||||
|
rem Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a semi-colon
|
||||||
|
rem as this is used as the separator in the classpath and Java provides no
|
||||||
|
rem mechanism for escaping if the same character appears in the path. Check this
|
||||||
|
rem by replacing all occurrences of ';' with '' and checking that neither
|
||||||
|
rem CATALINA_HOME nor CATALINA_BASE have changed
|
||||||
|
if "%CATALINA_HOME%" == "%CATALINA_HOME:;=%" goto homeNoSemicolon
|
||||||
|
echo Using CATALINA_HOME: "%CATALINA_HOME%"
|
||||||
|
echo Unable to start as CATALINA_HOME contains a semicolon (;) character
|
||||||
|
goto end
|
||||||
|
:homeNoSemicolon
|
||||||
|
|
||||||
|
if "%CATALINA_BASE%" == "%CATALINA_BASE:;=%" goto baseNoSemicolon
|
||||||
|
echo Using CATALINA_BASE: "%CATALINA_BASE%"
|
||||||
|
echo Unable to start as CATALINA_BASE contains a semicolon (;) character
|
||||||
|
goto end
|
||||||
|
:baseNoSemicolon
|
||||||
|
|
||||||
|
rem Ensure that any user defined CLASSPATH variables are not used on startup,
|
||||||
|
rem but allow them to be specified in setenv.bat, in rare case when it is needed.
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
|
rem Get standard environment variables
|
||||||
|
if not exist "%CATALINA_BASE%\bin\setenv.bat" goto checkSetenvHome
|
||||||
|
call "%CATALINA_BASE%\bin\setenv.bat"
|
||||||
|
goto setenvDone
|
||||||
|
:checkSetenvHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
|
||||||
|
:setenvDone
|
||||||
|
|
||||||
|
rem Get standard Java environment variables
|
||||||
|
if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
|
||||||
|
echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okSetclasspath
|
||||||
|
call "%CATALINA_HOME%\bin\setclasspath.bat" %1
|
||||||
|
if errorlevel 1 goto end
|
||||||
|
|
||||||
|
rem Add on extra jar file to CLASSPATH
|
||||||
|
rem Note that there are no quotes as we do not want to introduce random
|
||||||
|
rem quotes into the CLASSPATH
|
||||||
|
if "%CLASSPATH%" == "" goto emptyClasspath
|
||||||
|
set "CLASSPATH=%CLASSPATH%;"
|
||||||
|
:emptyClasspath
|
||||||
|
set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar"
|
||||||
|
|
||||||
|
if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
|
||||||
|
set "CATALINA_TMPDIR=%CATALINA_BASE%\temp"
|
||||||
|
:gotTmpdir
|
||||||
|
|
||||||
|
rem Add tomcat-juli.jar to classpath
|
||||||
|
rem tomcat-juli.jar can be over-ridden per instance
|
||||||
|
if not exist "%CATALINA_BASE%\bin\tomcat-juli.jar" goto juliClasspathHome
|
||||||
|
set "CLASSPATH=%CLASSPATH%;%CATALINA_BASE%\bin\tomcat-juli.jar"
|
||||||
|
goto juliClasspathDone
|
||||||
|
:juliClasspathHome
|
||||||
|
set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
|
||||||
|
:juliClasspathDone
|
||||||
|
|
||||||
|
if not "%JSSE_OPTS%" == "" goto gotJsseOpts
|
||||||
|
set "JSSE_OPTS=-Djdk.tls.ephemeralDHKeySize=2048"
|
||||||
|
:gotJsseOpts
|
||||||
|
set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
|
||||||
|
|
||||||
|
rem Register custom URL handlers
|
||||||
|
rem Do this here so custom URL handles (specifically 'war:...') can be used in the security policy
|
||||||
|
set "JAVA_OPTS=%JAVA_OPTS% -Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
|
||||||
|
|
||||||
|
rem Disable the global canonical file name cache to protect against CVE-2024-56337
|
||||||
|
rem Note: The cache is disabled by default in Java 12 to 20 inclusive
|
||||||
|
rem The cache is removed in Java 21 onwards
|
||||||
|
rem Need to set this here as java.io.FileSystem caches this in a static field during class
|
||||||
|
rem initialisation so it needs to be set before any file system access
|
||||||
|
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.io.useCanonCaches=false"
|
||||||
|
|
||||||
|
rem Check for the deprecated LOGGING_CONFIG
|
||||||
|
rem Only use it if CATALINA_LOGGING_CONFIG is not set and LOGGING_CONFIG starts with "-D..."
|
||||||
|
if not "%LOGGING_CONFIG:~0,2%"=="-D" goto noLoggingDeprecation
|
||||||
|
if not "%CATALINA_LOGGING_CONFIG%" == "" goto noLoggingDeprecation
|
||||||
|
set "CATALINA_LOGGING_CONFIG=%LOGGING_CONFIG%"
|
||||||
|
:noLoggingDeprecation
|
||||||
|
|
||||||
|
if not "%CATALINA_LOGGING_CONFIG%" == "" goto noJuliConfig
|
||||||
|
set CATALINA_LOGGING_CONFIG=-Dnop
|
||||||
|
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
|
||||||
|
set CATALINA_LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
|
||||||
|
:noJuliConfig
|
||||||
|
|
||||||
|
if not "%LOGGING_MANAGER%" == "" goto noJuliManager
|
||||||
|
set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||||
|
:noJuliManager
|
||||||
|
|
||||||
|
rem Configure JAVA 9 specific start-up parameters - ensure to keep it in line with service.bat
|
||||||
|
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.lang=ALL-UNNAMED"
|
||||||
|
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
|
||||||
|
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.lang.reflect=ALL-UNNAMED"
|
||||||
|
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.io=ALL-UNNAMED"
|
||||||
|
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.util=ALL-UNNAMED"
|
||||||
|
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||||
|
set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
|
||||||
|
|
||||||
|
rem Java 9 no longer supports the java.endorsed.dirs
|
||||||
|
rem system property. Only try to use it if
|
||||||
|
rem JAVA_ENDORSED_DIRS was explicitly set
|
||||||
|
rem or CATALINA_HOME/endorsed exists.
|
||||||
|
set ENDORSED_PROP=ignore.endorsed.dirs
|
||||||
|
if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar
|
||||||
|
set ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
goto doneEndorsed
|
||||||
|
:noEndorsedVar
|
||||||
|
if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed
|
||||||
|
set ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
:doneEndorsed
|
||||||
|
|
||||||
|
rem ----- Execute The Requested Command ---------------------------------------
|
||||||
|
|
||||||
|
echo Using CATALINA_BASE: "%CATALINA_BASE%"
|
||||||
|
echo Using CATALINA_HOME: "%CATALINA_HOME%"
|
||||||
|
echo Using CATALINA_TMPDIR: "%CATALINA_TMPDIR%"
|
||||||
|
if ""%1"" == ""debug"" goto use_jdk
|
||||||
|
echo Using JRE_HOME: "%JRE_HOME%"
|
||||||
|
goto java_dir_displayed
|
||||||
|
:use_jdk
|
||||||
|
echo Using JAVA_HOME: "%JAVA_HOME%"
|
||||||
|
:java_dir_displayed
|
||||||
|
echo Using CLASSPATH: "%CLASSPATH%"
|
||||||
|
echo Using CATALINA_OPTS: "%CATALINA_OPTS%"
|
||||||
|
|
||||||
|
set _EXECJAVA="%_RUNJAVA%"
|
||||||
|
set MAINCLASS=org.apache.catalina.startup.Bootstrap
|
||||||
|
set ACTION=start
|
||||||
|
set SECURITY_POLICY_FILE=
|
||||||
|
set DEBUG_OPTS=
|
||||||
|
set JPDA=
|
||||||
|
|
||||||
|
if not ""%1"" == ""jpda"" goto noJpda
|
||||||
|
set JPDA=jpda
|
||||||
|
if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
|
||||||
|
set JPDA_TRANSPORT=dt_socket
|
||||||
|
:gotJpdaTransport
|
||||||
|
if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
|
||||||
|
set JPDA_ADDRESS=localhost:8000
|
||||||
|
:gotJpdaAddress
|
||||||
|
if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
|
||||||
|
set JPDA_SUSPEND=n
|
||||||
|
:gotJpdaSuspend
|
||||||
|
if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
|
||||||
|
set JPDA_OPTS=-agentlib:jdwp=transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
|
||||||
|
:gotJpdaOpts
|
||||||
|
shift
|
||||||
|
:noJpda
|
||||||
|
|
||||||
|
if ""%1"" == ""debug"" goto doDebug
|
||||||
|
if ""%1"" == ""run"" goto doRun
|
||||||
|
if ""%1"" == ""start"" goto doStart
|
||||||
|
if ""%1"" == ""stop"" goto doStop
|
||||||
|
if ""%1"" == ""configtest"" goto doConfigTest
|
||||||
|
if ""%1"" == ""version"" goto doVersion
|
||||||
|
|
||||||
|
echo Usage: catalina ( commands ... )
|
||||||
|
echo commands:
|
||||||
|
echo debug Start Catalina in a debugger
|
||||||
|
echo debug -security Debug Catalina with a security manager
|
||||||
|
echo jpda start Start Catalina under JPDA debugger
|
||||||
|
echo run Start Catalina in the current window
|
||||||
|
echo run -security Start in the current window with security manager
|
||||||
|
echo start Start Catalina in a separate window
|
||||||
|
echo start -security Start in a separate window with security manager
|
||||||
|
echo stop Stop Catalina
|
||||||
|
echo configtest Run a basic syntax check on server.xml
|
||||||
|
echo version What version of tomcat are you running?
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:doDebug
|
||||||
|
shift
|
||||||
|
set _EXECJAVA="%_RUNJDB%"
|
||||||
|
set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
|
||||||
|
if not ""%1"" == ""-security"" goto execCmd
|
||||||
|
shift
|
||||||
|
echo Using Security Manager
|
||||||
|
set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
|
||||||
|
goto execCmd
|
||||||
|
|
||||||
|
:doRun
|
||||||
|
shift
|
||||||
|
if not ""%1"" == ""-security"" goto execCmd
|
||||||
|
shift
|
||||||
|
echo Using Security Manager
|
||||||
|
set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
|
||||||
|
goto execCmd
|
||||||
|
|
||||||
|
:doStart
|
||||||
|
shift
|
||||||
|
if "%TITLE%" == "" set TITLE=Tomcat
|
||||||
|
set _EXECJAVA=start "%TITLE%" "%_RUNJAVA%"
|
||||||
|
if not ""%1"" == ""-security"" goto execCmd
|
||||||
|
shift
|
||||||
|
echo Using Security Manager
|
||||||
|
set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
|
||||||
|
goto execCmd
|
||||||
|
|
||||||
|
:doStop
|
||||||
|
shift
|
||||||
|
set ACTION=stop
|
||||||
|
set CATALINA_OPTS=
|
||||||
|
goto execCmd
|
||||||
|
|
||||||
|
:doConfigTest
|
||||||
|
shift
|
||||||
|
set ACTION=configtest
|
||||||
|
set CATALINA_OPTS=
|
||||||
|
goto execCmd
|
||||||
|
|
||||||
|
:doVersion
|
||||||
|
%_EXECJAVA% %JAVA_OPTS% -classpath "%CATALINA_HOME%\lib\catalina.jar" org.apache.catalina.util.ServerInfo
|
||||||
|
goto end
|
||||||
|
|
||||||
|
|
||||||
|
:execCmd
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
rem Execute Java with the applicable properties
|
||||||
|
if not "%JPDA%" == "" goto doJpda
|
||||||
|
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
|
||||||
|
%_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||||
|
goto end
|
||||||
|
:doSecurity
|
||||||
|
%_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||||
|
goto end
|
||||||
|
:doJpda
|
||||||
|
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
|
||||||
|
%_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||||
|
goto end
|
||||||
|
:doSecurityJpda
|
||||||
|
%_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:end
|
697
apache-tomcat-9.0.109/bin/catalina.sh
Normal file
697
apache-tomcat-9.0.109/bin/catalina.sh
Normal file
@ -0,0 +1,697 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Control Script for the CATALINA Server
|
||||||
|
#
|
||||||
|
# For supported commands call "catalina.sh help" or see the usage section at
|
||||||
|
# the end of this file.
|
||||||
|
#
|
||||||
|
# Environment Variable Prerequisites
|
||||||
|
#
|
||||||
|
# Do not set the variables in this script. Instead put them into a script
|
||||||
|
# setenv.sh in CATALINA_BASE/bin to keep your customizations separate.
|
||||||
|
#
|
||||||
|
# CATALINA_HOME May point at your Catalina "build" directory.
|
||||||
|
#
|
||||||
|
# CATALINA_BASE (Optional) Base directory for resolving dynamic portions
|
||||||
|
# of a Catalina installation. If not present, resolves to
|
||||||
|
# the same directory that CATALINA_HOME points to.
|
||||||
|
#
|
||||||
|
# CATALINA_OUT (Optional) Full path to a file where stdout and stderr
|
||||||
|
# will be redirected.
|
||||||
|
# Default is $CATALINA_BASE/logs/catalina.out
|
||||||
|
#
|
||||||
|
# CATALINA_OUT_CMD (Optional) Command which will be executed and receive
|
||||||
|
# as its stdin the stdout and stderr from the Tomcat java
|
||||||
|
# process. If CATALINA_OUT_CMD is set, the value of
|
||||||
|
# CATALINA_OUT will be used as a named pipe.
|
||||||
|
# No default.
|
||||||
|
# Example (all one line)
|
||||||
|
# CATALINA_OUT_CMD="/usr/bin/rotatelogs -f $CATALINA_BASE/logs/catalina.out.%Y-%m-%d.log 86400"
|
||||||
|
#
|
||||||
|
# CATALINA_OPTS (Optional) Java runtime options used when the "start",
|
||||||
|
# "run" or "debug" command is executed.
|
||||||
|
# Include here and not in JAVA_OPTS all options, that should
|
||||||
|
# only be used by Tomcat itself, not by the stop process,
|
||||||
|
# the version command etc.
|
||||||
|
# Examples are heap size, GC logging, JMX ports etc.
|
||||||
|
#
|
||||||
|
# CATALINA_TMPDIR (Optional) Directory path location of temporary directory
|
||||||
|
# the JVM should use (java.io.tmpdir). Defaults to
|
||||||
|
# $CATALINA_BASE/temp.
|
||||||
|
#
|
||||||
|
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
# Required to run the with the "debug" argument.
|
||||||
|
#
|
||||||
|
# JRE_HOME Must point at your Java Runtime installation.
|
||||||
|
# Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
|
||||||
|
# are both set, JRE_HOME is used.
|
||||||
|
#
|
||||||
|
# JAVA_OPTS (Optional) Java runtime options used when any command
|
||||||
|
# is executed.
|
||||||
|
# Include here and not in CATALINA_OPTS all options, that
|
||||||
|
# should be used by Tomcat and also by the stop process,
|
||||||
|
# the version command etc.
|
||||||
|
# Most options should go into CATALINA_OPTS.
|
||||||
|
#
|
||||||
|
# JAVA_ENDORSED_DIRS (Optional) Lists of of colon separated directories
|
||||||
|
# containing some jars in order to allow replacement of APIs
|
||||||
|
# created outside of the JCP (i.e. DOM and SAX from W3C).
|
||||||
|
# It can also be used to update the XML parser implementation.
|
||||||
|
# This is only supported for Java <= 8.
|
||||||
|
# Defaults to $CATALINA_HOME/endorsed.
|
||||||
|
#
|
||||||
|
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
|
||||||
|
# command is executed. The default is "dt_socket".
|
||||||
|
#
|
||||||
|
# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
|
||||||
|
# command is executed. The default is localhost:8000.
|
||||||
|
#
|
||||||
|
# JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
|
||||||
|
# command is executed. Specifies whether JVM should suspend
|
||||||
|
# execution immediately after startup. Default is "n".
|
||||||
|
#
|
||||||
|
# JPDA_OPTS (Optional) Java runtime options used when the "jpda start"
|
||||||
|
# command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS,
|
||||||
|
# and JPDA_SUSPEND are ignored. Thus, all required jpda
|
||||||
|
# options MUST be specified. The default is:
|
||||||
|
#
|
||||||
|
# -agentlib:jdwp=transport=$JPDA_TRANSPORT,
|
||||||
|
# address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND
|
||||||
|
#
|
||||||
|
# JSSE_OPTS (Optional) Java runtime options used to control the TLS
|
||||||
|
# implementation when JSSE is used. Default is:
|
||||||
|
# "-Djdk.tls.ephemeralDHKeySize=2048"
|
||||||
|
#
|
||||||
|
# CATALINA_PID (Optional) Path of the file which should contains the pid
|
||||||
|
# of the catalina startup java process, when start (fork) is
|
||||||
|
# used
|
||||||
|
#
|
||||||
|
# CATALINA_LOGGING_CONFIG (Optional) Override Tomcat's logging config file
|
||||||
|
# Example (all one line)
|
||||||
|
# CATALINA_LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
|
||||||
|
#
|
||||||
|
# LOGGING_CONFIG Deprecated
|
||||||
|
# Use CATALINA_LOGGING_CONFIG
|
||||||
|
# This is only used if CATALINA_LOGGING_CONFIG is not set
|
||||||
|
# and LOGGING_CONFIG starts with "-D..."
|
||||||
|
#
|
||||||
|
# LOGGING_MANAGER (Optional) Override Tomcat's logging manager
|
||||||
|
# Example (all one line)
|
||||||
|
# LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
|
||||||
|
#
|
||||||
|
# UMASK (Optional) Override Tomcat's default UMASK of 0027
|
||||||
|
#
|
||||||
|
# USE_NOHUP (Optional) If set to the string true the start command will
|
||||||
|
# use nohup so that the Tomcat process will ignore any hangup
|
||||||
|
# signals. Default is "false" unless running on HP-UX in which
|
||||||
|
# case the default is "true"
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false
|
||||||
|
darwin=false
|
||||||
|
os400=false
|
||||||
|
hpux=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true;;
|
||||||
|
Darwin*) darwin=true;;
|
||||||
|
OS400*) os400=true;;
|
||||||
|
HP-UX*) hpux=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ]; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Get standard environment variables
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
|
||||||
|
# Only set CATALINA_HOME if not already set
|
||||||
|
[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||||
|
|
||||||
|
# Copy CATALINA_BASE from CATALINA_HOME if not already set
|
||||||
|
[ -z "$CATALINA_BASE" ] && CATALINA_BASE="$CATALINA_HOME"
|
||||||
|
|
||||||
|
# Ensure that any user defined CLASSPATH variables are not used on startup,
|
||||||
|
# but allow them to be specified in setenv.sh, in rare case when it is needed.
|
||||||
|
CLASSPATH=
|
||||||
|
|
||||||
|
if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
|
||||||
|
. "$CATALINA_BASE/bin/setenv.sh"
|
||||||
|
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
|
||||||
|
. "$CATALINA_HOME/bin/setenv.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
|
||||||
|
[ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
|
||||||
|
[ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"`
|
||||||
|
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon
|
||||||
|
# as this is used as the separator in the classpath and Java provides no
|
||||||
|
# mechanism for escaping if the same character appears in the path.
|
||||||
|
case $CATALINA_HOME in
|
||||||
|
*:*) echo "Using CATALINA_HOME: $CATALINA_HOME";
|
||||||
|
echo "Unable to start as CATALINA_HOME contains a colon (:) character";
|
||||||
|
exit 1;
|
||||||
|
esac
|
||||||
|
case $CATALINA_BASE in
|
||||||
|
*:*) echo "Using CATALINA_BASE: $CATALINA_BASE";
|
||||||
|
echo "Unable to start as CATALINA_BASE contains a colon (:) character";
|
||||||
|
exit 1;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# For OS400
|
||||||
|
if $os400; then
|
||||||
|
# Set job priority to standard for interactive (interactive - 6) by using
|
||||||
|
# the interactive priority - 6, the helper threads that respond to requests
|
||||||
|
# will be running at the same priority as interactive jobs.
|
||||||
|
COMMAND='chgjob job('$JOBNAME') runpty(6)'
|
||||||
|
system $COMMAND
|
||||||
|
|
||||||
|
# Enable multi threading
|
||||||
|
export QIBM_MULTI_THREADED=Y
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get standard Java environment variables
|
||||||
|
if $os400; then
|
||||||
|
# -r will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||||
|
else
|
||||||
|
if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
|
||||||
|
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||||
|
else
|
||||||
|
echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add on extra jar files to CLASSPATH
|
||||||
|
if [ ! -z "$CLASSPATH" ] ; then
|
||||||
|
CLASSPATH="$CLASSPATH":
|
||||||
|
fi
|
||||||
|
CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar
|
||||||
|
|
||||||
|
if [ -z "$CATALINA_OUT" ] ; then
|
||||||
|
CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$CATALINA_TMPDIR" ] ; then
|
||||||
|
# Define the java.io.tmpdir to use for Catalina
|
||||||
|
CATALINA_TMPDIR="$CATALINA_BASE"/temp
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add tomcat-juli.jar to classpath
|
||||||
|
# tomcat-juli.jar can be over-ridden per instance
|
||||||
|
if [ -r "$CATALINA_BASE/bin/tomcat-juli.jar" ] ; then
|
||||||
|
CLASSPATH=$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar
|
||||||
|
else
|
||||||
|
CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Bugzilla 37848: When no TTY is available, don't output to console
|
||||||
|
have_tty=0
|
||||||
|
if [ -t 0 ]; then
|
||||||
|
have_tty=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
|
||||||
|
JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
|
||||||
|
CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
|
||||||
|
CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
|
||||||
|
CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$JAVA_ENDORSED_DIRS" ] && JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JSSE_OPTS" ] ; then
|
||||||
|
JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
|
||||||
|
fi
|
||||||
|
JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS"
|
||||||
|
|
||||||
|
# Register custom URL handlers
|
||||||
|
# Do this here so custom URL handles (specifically 'war:...') can be used in the security policy
|
||||||
|
JAVA_OPTS="$JAVA_OPTS -Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
|
||||||
|
|
||||||
|
# Disable the global canonical file name cache to protect against CVE-2024-56337
|
||||||
|
# Note: The cache is disabled by default in Java 12 to 20 inclusive
|
||||||
|
# The cache is removed in Java 21 onwards
|
||||||
|
# Need to set this here as java.io.FileSystem caches this in a static field during class
|
||||||
|
# initialisation so it needs to be set before any file system access
|
||||||
|
JAVA_OPTS="$JAVA_OPTS -Dsun.io.useCanonCaches=false"
|
||||||
|
|
||||||
|
# Check for the deprecated LOGGING_CONFIG
|
||||||
|
# Only use it if CATALINA_LOGGING_CONFIG is not set and LOGGING_CONFIG starts with "-D..."
|
||||||
|
if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
|
||||||
|
case $LOGGING_CONFIG in
|
||||||
|
-D*) CATALINA_LOGGING_CONFIG="$LOGGING_CONFIG"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set juli LogManager config file if it is present and an override has not been issued
|
||||||
|
if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
|
||||||
|
if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
|
||||||
|
CATALINA_LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
|
||||||
|
else
|
||||||
|
# Bugzilla 45585
|
||||||
|
CATALINA_LOGGING_CONFIG="-Dnop"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$LOGGING_MANAGER" ]; then
|
||||||
|
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set UMASK unless it has been overridden
|
||||||
|
if [ -z "$UMASK" ]; then
|
||||||
|
UMASK="0027"
|
||||||
|
fi
|
||||||
|
umask $UMASK
|
||||||
|
|
||||||
|
# Java 9 no longer supports the java.endorsed.dirs
|
||||||
|
# system property. Only try to use it if
|
||||||
|
# JAVA_ENDORSED_DIRS was explicitly set
|
||||||
|
# or CATALINA_HOME/endorsed exists.
|
||||||
|
ENDORSED_PROP=ignore.endorsed.dirs
|
||||||
|
if [ -n "$JAVA_ENDORSED_DIRS" ]; then
|
||||||
|
ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
fi
|
||||||
|
if [ -d "$CATALINA_HOME/endorsed" ]; then
|
||||||
|
ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make the umask available when using the org.apache.catalina.security.SecurityListener
|
||||||
|
JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
|
||||||
|
|
||||||
|
if [ -z "$USE_NOHUP" ]; then
|
||||||
|
if $hpux; then
|
||||||
|
USE_NOHUP="true"
|
||||||
|
else
|
||||||
|
USE_NOHUP="false"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset _NOHUP
|
||||||
|
if [ "$USE_NOHUP" = "true" ]; then
|
||||||
|
_NOHUP="nohup"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add the JAVA 9 specific start-up parameters required by Tomcat
|
||||||
|
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED"
|
||||||
|
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
|
||||||
|
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang.reflect=ALL-UNNAMED"
|
||||||
|
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.io=ALL-UNNAMED"
|
||||||
|
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util=ALL-UNNAMED"
|
||||||
|
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||||
|
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
|
||||||
|
export JDK_JAVA_OPTIONS
|
||||||
|
|
||||||
|
# ----- Execute The Requested Command -----------------------------------------
|
||||||
|
|
||||||
|
# Bugzilla 37848: only output this if we have a TTY
|
||||||
|
if [ $have_tty -eq 1 ]; then
|
||||||
|
echo "Using CATALINA_BASE: $CATALINA_BASE"
|
||||||
|
echo "Using CATALINA_HOME: $CATALINA_HOME"
|
||||||
|
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
|
||||||
|
if [ "$1" = "debug" ] ; then
|
||||||
|
echo "Using JAVA_HOME: $JAVA_HOME"
|
||||||
|
else
|
||||||
|
echo "Using JRE_HOME: $JRE_HOME"
|
||||||
|
fi
|
||||||
|
echo "Using CLASSPATH: $CLASSPATH"
|
||||||
|
echo "Using CATALINA_OPTS: $CATALINA_OPTS"
|
||||||
|
if [ ! -z "$CATALINA_PID" ]; then
|
||||||
|
echo "Using CATALINA_PID: $CATALINA_PID"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "jpda" ] ; then
|
||||||
|
if [ -z "$JPDA_TRANSPORT" ]; then
|
||||||
|
JPDA_TRANSPORT="dt_socket"
|
||||||
|
fi
|
||||||
|
if [ -z "$JPDA_ADDRESS" ]; then
|
||||||
|
JPDA_ADDRESS="localhost:8000"
|
||||||
|
fi
|
||||||
|
if [ -z "$JPDA_SUSPEND" ]; then
|
||||||
|
JPDA_SUSPEND="n"
|
||||||
|
fi
|
||||||
|
if [ -z "$JPDA_OPTS" ]; then
|
||||||
|
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
|
||||||
|
fi
|
||||||
|
CATALINA_OPTS="$JPDA_OPTS $CATALINA_OPTS"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "debug" ] ; then
|
||||||
|
if $os400; then
|
||||||
|
echo "Debug command not available on OS400"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
shift
|
||||||
|
if [ "$1" = "-security" ] ; then
|
||||||
|
if [ $have_tty -eq 1 ]; then
|
||||||
|
echo "Using Security Manager"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
eval exec "\"$_RUNJDB\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
-sourcepath "$CATALINA_HOME"/../../java \
|
||||||
|
-Djava.security.manager \
|
||||||
|
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
|
||||||
|
-Dcatalina.base="$CATALINA_BASE" \
|
||||||
|
-Dcatalina.home="$CATALINA_HOME" \
|
||||||
|
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||||
|
org.apache.catalina.startup.Bootstrap "$@" start
|
||||||
|
else
|
||||||
|
eval exec "\"$_RUNJDB\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
-sourcepath "$CATALINA_HOME"/../../java \
|
||||||
|
-Dcatalina.base="$CATALINA_BASE" \
|
||||||
|
-Dcatalina.home="$CATALINA_HOME" \
|
||||||
|
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||||
|
org.apache.catalina.startup.Bootstrap "$@" start
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ "$1" = "run" ]; then
|
||||||
|
|
||||||
|
shift
|
||||||
|
if [ "$1" = "-security" ] ; then
|
||||||
|
if [ $have_tty -eq 1 ]; then
|
||||||
|
echo "Using Security Manager"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
eval exec "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-Djava.security.manager \
|
||||||
|
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
|
||||||
|
org.apache.catalina.startup.Bootstrap "$@" start
|
||||||
|
else
|
||||||
|
eval exec "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
|
||||||
|
org.apache.catalina.startup.Bootstrap "$@" start
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ "$1" = "start" ] ; then
|
||||||
|
|
||||||
|
if [ ! -z "$CATALINA_PID" ]; then
|
||||||
|
if [ -f "$CATALINA_PID" ]; then
|
||||||
|
if [ -s "$CATALINA_PID" ]; then
|
||||||
|
echo "Existing PID file found during start."
|
||||||
|
if [ -r "$CATALINA_PID" ]; then
|
||||||
|
PID=`cat "$CATALINA_PID"`
|
||||||
|
ps -p $PID >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
echo "Tomcat appears to still be running with PID $PID. Start aborted."
|
||||||
|
echo "If the following process is not a Tomcat process, remove the PID file and try again:"
|
||||||
|
ps -f -p $PID
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Removing/clearing stale PID file."
|
||||||
|
rm -f "$CATALINA_PID" >/dev/null 2>&1
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
if [ -w "$CATALINA_PID" ]; then
|
||||||
|
cat /dev/null > "$CATALINA_PID"
|
||||||
|
else
|
||||||
|
echo "Unable to remove or clear stale PID file. Start aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Unable to read PID file. Start aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rm -f "$CATALINA_PID" >/dev/null 2>&1
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
if [ ! -w "$CATALINA_PID" ]; then
|
||||||
|
echo "Unable to remove or write to empty PID file. Start aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
shift
|
||||||
|
if [ -z "$CATALINA_OUT_CMD" ] ; then
|
||||||
|
touch "$CATALINA_OUT"
|
||||||
|
else
|
||||||
|
if [ ! -e "$CATALINA_OUT" ]; then
|
||||||
|
if ! mkfifo "$CATALINA_OUT"; then
|
||||||
|
echo "cannot create named pipe $CATALINA_OUT. Start aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ ! -p "$CATALINA_OUT" ]; then
|
||||||
|
echo "$CATALINA_OUT exists and is not a named pipe. Start aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
$CATALINA_OUT_CMD <"$CATALINA_OUT" &
|
||||||
|
fi
|
||||||
|
if [ "$1" = "-security" ] ; then
|
||||||
|
if [ $have_tty -eq 1 ]; then
|
||||||
|
echo "Using Security Manager"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
eval $_NOHUP "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-Djava.security.manager \
|
||||||
|
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
|
||||||
|
org.apache.catalina.startup.Bootstrap "$@" start \
|
||||||
|
>> "$CATALINA_OUT" 2>&1 "&"
|
||||||
|
|
||||||
|
else
|
||||||
|
eval $_NOHUP "\"$_RUNJAVA\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
|
||||||
|
org.apache.catalina.startup.Bootstrap "$@" start \
|
||||||
|
>> "$CATALINA_OUT" 2>&1 "&"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$CATALINA_PID" ]; then
|
||||||
|
echo $! > "$CATALINA_PID"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Tomcat started."
|
||||||
|
|
||||||
|
elif [ "$1" = "stop" ] ; then
|
||||||
|
|
||||||
|
shift
|
||||||
|
|
||||||
|
SLEEP=5
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
echo $1 | grep "[^0-9]" >/dev/null 2>&1
|
||||||
|
if [ $? -gt 0 ]; then
|
||||||
|
SLEEP=$1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
FORCE=0
|
||||||
|
if [ "$1" = "-force" ]; then
|
||||||
|
shift
|
||||||
|
FORCE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$CATALINA_PID" ]; then
|
||||||
|
if [ -f "$CATALINA_PID" ]; then
|
||||||
|
if [ -s "$CATALINA_PID" ]; then
|
||||||
|
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
|
||||||
|
if [ $? -gt 0 ]; then
|
||||||
|
echo "PID file found but either no matching process was found or the current user does not have permission to stop the process. Stop aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "PID file is empty and has been ignored."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "\$CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER "$JAVA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
|
||||||
|
org.apache.catalina.startup.Bootstrap "$@" stop
|
||||||
|
|
||||||
|
# stop failed. Shutdown port disabled? Try a normal kill.
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
if [ ! -z "$CATALINA_PID" ]; then
|
||||||
|
echo "The stop command failed. Attempting to signal the process to stop through OS signal."
|
||||||
|
kill -15 `cat "$CATALINA_PID"` >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$CATALINA_PID" ]; then
|
||||||
|
if [ -f "$CATALINA_PID" ]; then
|
||||||
|
while [ $SLEEP -ge 0 ]; do
|
||||||
|
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
|
||||||
|
if [ $? -gt 0 ]; then
|
||||||
|
rm -f "$CATALINA_PID" >/dev/null 2>&1
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
if [ -w "$CATALINA_PID" ]; then
|
||||||
|
cat /dev/null > "$CATALINA_PID"
|
||||||
|
# If Tomcat has stopped don't try and force a stop with an empty PID file
|
||||||
|
FORCE=0
|
||||||
|
else
|
||||||
|
echo "The PID file could not be removed or cleared."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Tomcat stopped."
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ $SLEEP -gt 0 ]; then
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
if [ $SLEEP -eq 0 ]; then
|
||||||
|
echo "Tomcat did not stop in time."
|
||||||
|
if [ $FORCE -eq 0 ]; then
|
||||||
|
echo "PID file was not removed."
|
||||||
|
fi
|
||||||
|
echo "To aid diagnostics a thread dump has been written to standard out."
|
||||||
|
kill -3 `cat "$CATALINA_PID"`
|
||||||
|
fi
|
||||||
|
SLEEP=`expr $SLEEP - 1 `
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
KILL_SLEEP_INTERVAL=5
|
||||||
|
if [ $FORCE -eq 1 ]; then
|
||||||
|
if [ -z "$CATALINA_PID" ]; then
|
||||||
|
echo "Kill failed: \$CATALINA_PID not set"
|
||||||
|
else
|
||||||
|
if [ -f "$CATALINA_PID" ]; then
|
||||||
|
PID=`cat "$CATALINA_PID"`
|
||||||
|
echo "Killing Tomcat with the PID: $PID"
|
||||||
|
kill -9 $PID
|
||||||
|
while [ $KILL_SLEEP_INTERVAL -ge 0 ]; do
|
||||||
|
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
|
||||||
|
if [ $? -gt 0 ]; then
|
||||||
|
rm -f "$CATALINA_PID" >/dev/null 2>&1
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
if [ -w "$CATALINA_PID" ]; then
|
||||||
|
cat /dev/null > "$CATALINA_PID"
|
||||||
|
else
|
||||||
|
echo "The PID file could not be removed."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "The Tomcat process has been killed."
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
KILL_SLEEP_INTERVAL=`expr $KILL_SLEEP_INTERVAL - 1 `
|
||||||
|
done
|
||||||
|
if [ $KILL_SLEEP_INTERVAL -lt 0 ]; then
|
||||||
|
echo "Tomcat has not been killed completely yet. The process might be waiting on some system call or might be UNINTERRUPTIBLE."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ "$1" = "configtest" ] ; then
|
||||||
|
|
||||||
|
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER "$JAVA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
|
||||||
|
org.apache.catalina.startup.Bootstrap configtest
|
||||||
|
result=$?
|
||||||
|
if [ $result -ne 0 ]; then
|
||||||
|
echo "Configuration error detected!"
|
||||||
|
fi
|
||||||
|
exit $result
|
||||||
|
|
||||||
|
elif [ "$1" = "version" ] ; then
|
||||||
|
|
||||||
|
eval "\"$_RUNJAVA\"" "$JAVA_OPTS" \
|
||||||
|
-classpath "\"$CATALINA_HOME/lib/catalina.jar\"" \
|
||||||
|
org.apache.catalina.util.ServerInfo
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "Usage: catalina.sh ( commands ... )"
|
||||||
|
echo "commands:"
|
||||||
|
if $os400; then
|
||||||
|
echo " debug Start Catalina in a debugger (not available on OS400)"
|
||||||
|
echo " debug -security Debug Catalina with a security manager (not available on OS400)"
|
||||||
|
else
|
||||||
|
echo " debug Start Catalina in a debugger"
|
||||||
|
echo " debug -security Debug Catalina with a security manager"
|
||||||
|
fi
|
||||||
|
echo " jpda start Start Catalina under JPDA debugger"
|
||||||
|
echo " run Start Catalina in the current window"
|
||||||
|
echo " run -security Start in the current window with security manager"
|
||||||
|
echo " start Start Catalina in a separate window"
|
||||||
|
echo " start -security Start in a separate window with security manager"
|
||||||
|
echo " stop Stop Catalina, waiting up to 5 seconds for the process to end"
|
||||||
|
echo " stop n Stop Catalina, waiting up to n seconds for the process to end"
|
||||||
|
echo " stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running"
|
||||||
|
echo " stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if still running"
|
||||||
|
echo " configtest Run a basic syntax check on server.xml - check exit code for result"
|
||||||
|
echo " version What version of tomcat are you running?"
|
||||||
|
echo "Note: Waiting for the process to end and use of the -force option require that \$CATALINA_PID is defined"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
fi
|
58
apache-tomcat-9.0.109/bin/ciphers.bat
Normal file
58
apache-tomcat-9.0.109/bin/ciphers.bat
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Script to digest password using the algorithm specified
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
|
||||||
|
|
||||||
|
rem Check that target executable exists
|
||||||
|
if exist "%EXECUTABLE%" goto okExec
|
||||||
|
echo Cannot find "%EXECUTABLE%"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okExec
|
||||||
|
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
call "%EXECUTABLE%" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
60
apache-tomcat-9.0.109/bin/ciphers.sh
Normal file
60
apache-tomcat-9.0.109/bin/ciphers.sh
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Script to digest password using the algorithm specified
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Better OS/400 detection: see Bugzilla 31132
|
||||||
|
os400=false
|
||||||
|
case "`uname`" in
|
||||||
|
OS400*) os400=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
EXECUTABLE=tool-wrapper.sh
|
||||||
|
|
||||||
|
# Check that target executable exists
|
||||||
|
if $os400; then
|
||||||
|
# -x will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
eval
|
||||||
|
else
|
||||||
|
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||||
|
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||||
|
echo "The file is absent or does not have execute permission"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$PRGDIR"/"$EXECUTABLE" org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser "$@"
|
BIN
apache-tomcat-9.0.109/bin/commons-daemon-native.tar.gz
Normal file
BIN
apache-tomcat-9.0.109/bin/commons-daemon-native.tar.gz
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/bin/commons-daemon.jar
Normal file
BIN
apache-tomcat-9.0.109/bin/commons-daemon.jar
Normal file
Binary file not shown.
58
apache-tomcat-9.0.109/bin/configtest.bat
Normal file
58
apache-tomcat-9.0.109/bin/configtest.bat
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Configuration test script for the CATALINA Server
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
|
||||||
|
|
||||||
|
rem Check that target executable exists
|
||||||
|
if exist "%EXECUTABLE%" goto okExec
|
||||||
|
echo Cannot find "%EXECUTABLE%"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okExec
|
||||||
|
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
call "%EXECUTABLE%" configtest %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
60
apache-tomcat-9.0.109/bin/configtest.sh
Normal file
60
apache-tomcat-9.0.109/bin/configtest.sh
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Configuration Test Script for the CATALINA Server
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Better OS/400 detection: see Bugzilla 31132
|
||||||
|
os400=false
|
||||||
|
case "`uname`" in
|
||||||
|
OS400*) os400=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
EXECUTABLE=catalina.sh
|
||||||
|
|
||||||
|
# Check that target executable exists
|
||||||
|
if $os400; then
|
||||||
|
# -x will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
eval
|
||||||
|
else
|
||||||
|
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||||
|
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||||
|
echo "The file is absent or does not have execute permission"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$PRGDIR"/"$EXECUTABLE" configtest "$@"
|
293
apache-tomcat-9.0.109/bin/daemon.sh
Normal file
293
apache-tomcat-9.0.109/bin/daemon.sh
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Commons Daemon wrapper script.
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ]; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
DIRNAME="`dirname "$PRG"`"
|
||||||
|
PROGRAM="`basename "$PRG"`"
|
||||||
|
while [ ".$1" != . ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
--java-home )
|
||||||
|
JAVA_HOME="$2"
|
||||||
|
shift; shift;
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
--catalina-home )
|
||||||
|
CATALINA_HOME="$2"
|
||||||
|
shift; shift;
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
--catalina-base )
|
||||||
|
CATALINA_BASE="$2"
|
||||||
|
shift; shift;
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
--catalina-pid )
|
||||||
|
CATALINA_PID="$2"
|
||||||
|
shift; shift;
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
--tomcat-user )
|
||||||
|
TOMCAT_USER="$2"
|
||||||
|
shift; shift;
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
--service-start-wait-time )
|
||||||
|
SERVICE_START_WAIT_TIME="$2"
|
||||||
|
shift; shift;
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*)
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin*)
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that
|
||||||
|
test ".$MAX_FD" = . && MAX_FD="maximum"
|
||||||
|
# Setup parameters for running the jsvc
|
||||||
|
#
|
||||||
|
test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat
|
||||||
|
# Set JAVA_HOME to working JDK or JRE
|
||||||
|
# If not set we'll try to guess the JAVA_HOME
|
||||||
|
# from java binary if on the PATH
|
||||||
|
#
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
JAVA_BIN="`which java 2>/dev/null || type java 2>&1`"
|
||||||
|
while [ -h "$JAVA_BIN" ]; do
|
||||||
|
ls=`ls -ld "$JAVA_BIN"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
JAVA_BIN="$link"
|
||||||
|
else
|
||||||
|
JAVA_BIN="`dirname "$JAVA_BIN"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
test -x "$JAVA_BIN" && JAVA_HOME="`dirname "$JAVA_BIN"`"
|
||||||
|
test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
|
||||||
|
else
|
||||||
|
JAVA_BIN="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Only set CATALINA_HOME if not already set
|
||||||
|
test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
|
||||||
|
test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
|
||||||
|
test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
|
||||||
|
# If not explicitly set, look for jsvc in CATALINA_BASE first then CATALINA_HOME
|
||||||
|
if [ -z "$JSVC" ]; then
|
||||||
|
JSVC="$CATALINA_BASE/bin/jsvc"
|
||||||
|
if [ ! -x "$JSVC" ]; then
|
||||||
|
JSVC="$CATALINA_HOME/bin/jsvc"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Set the default service-start wait time if necessary
|
||||||
|
test ".$SERVICE_START_WAIT_TIME" = . && SERVICE_START_WAIT_TIME=10
|
||||||
|
|
||||||
|
# Ensure that any user defined CLASSPATH variables are not used on startup,
|
||||||
|
# but allow them to be specified in setenv.sh, in rare case when it is needed.
|
||||||
|
CLASSPATH=
|
||||||
|
JAVA_OPTS=
|
||||||
|
if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
|
||||||
|
. "$CATALINA_BASE/bin/setenv.sh"
|
||||||
|
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
|
||||||
|
. "$CATALINA_HOME/bin/setenv.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add on extra jar files to CLASSPATH
|
||||||
|
test ".$CLASSPATH" != . && CLASSPATH="$CLASSPATH:"
|
||||||
|
CLASSPATH="$CLASSPATH$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-daemon.jar"
|
||||||
|
|
||||||
|
test ".$CATALINA_OUT" = . && CATALINA_OUT="$CATALINA_BASE/logs/catalina-daemon.out"
|
||||||
|
test ".$CATALINA_TMP" = . && CATALINA_TMP="$CATALINA_BASE/temp"
|
||||||
|
|
||||||
|
# Add tomcat-juli.jar to classpath
|
||||||
|
# tomcat-juli.jar can be over-ridden per instance
|
||||||
|
if [ -r "$CATALINA_BASE/bin/tomcat-juli.jar" ] ; then
|
||||||
|
CLASSPATH="$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar"
|
||||||
|
else
|
||||||
|
CLASSPATH="$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for the deprecated LOGGING_CONFIG
|
||||||
|
# Only use it if CATALINA_LOGGING_CONFIG is not set and LOGGING_CONFIG starts with "-D..."
|
||||||
|
if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
|
||||||
|
case $LOGGING_CONFIG in
|
||||||
|
-D*) CATALINA_LOGGING_CONFIG="$LOGGING_CONFIG"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set juli LogManager config file if it is present and an override has not been issued
|
||||||
|
if [ -z "$CATALINA_LOGGING_CONFIG" ]; then
|
||||||
|
if [ -r "$CATALINA_BASE/conf/logging.properties" ]; then
|
||||||
|
CATALINA_LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
|
||||||
|
else
|
||||||
|
# Bugzilla 45585
|
||||||
|
CATALINA_LOGGING_CONFIG="-Dnop"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
test ".$LOGGING_MANAGER" = . && LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
|
||||||
|
JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
|
||||||
|
|
||||||
|
# Set -pidfile
|
||||||
|
test ".$CATALINA_PID" = . && CATALINA_PID="$CATALINA_BASE/logs/catalina-daemon.pid"
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can
|
||||||
|
if [ "$cygwin" = "false" ]; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ "$?" -eq 0 ]; then
|
||||||
|
# Darwin does not allow RLIMIT_INFINITY on file soft limit
|
||||||
|
if [ "$darwin" = "true" ] && [ "$MAX_FD_LIMIT" = "unlimited" ]; then
|
||||||
|
MAX_FD_LIMIT=`/usr/sbin/sysctl -n kern.maxfilesperproc`
|
||||||
|
fi
|
||||||
|
test ".$MAX_FD" = ".maximum" && MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
echo "$PROGRAM: Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$PROGRAM: Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set UMASK unless it has been overridden
|
||||||
|
if [ -z "$UMASK" ]; then
|
||||||
|
UMASK="0027"
|
||||||
|
fi
|
||||||
|
umask $UMASK
|
||||||
|
|
||||||
|
# Java 9 no longer supports the java.endorsed.dirs
|
||||||
|
# system property. Only try to use it if
|
||||||
|
# JAVA_ENDORSED_DIRS was explicitly set
|
||||||
|
# or CATALINA_HOME/endorsed exists.
|
||||||
|
ENDORSED_PROP=ignore.endorsed.dirs
|
||||||
|
if [ -n "$JAVA_ENDORSED_DIRS" ]; then
|
||||||
|
ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
fi
|
||||||
|
if [ -d "$CATALINA_HOME/endorsed" ]; then
|
||||||
|
ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ----- Execute The Requested Command -----------------------------------------
|
||||||
|
case "$1" in
|
||||||
|
run )
|
||||||
|
shift
|
||||||
|
eval exec "\"$JSVC\"" $* \
|
||||||
|
"$JSVC_OPTS" \
|
||||||
|
-java-home "\"$JAVA_HOME\"" \
|
||||||
|
-pidfile "\"$CATALINA_PID\"" \
|
||||||
|
-wait $SERVICE_START_WAIT_TIME \
|
||||||
|
-umask $UMASK \
|
||||||
|
-nodetach \
|
||||||
|
-outfile "\"&1\"" \
|
||||||
|
-errfile "\"&2\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
"\"$CATALINA_LOGGING_CONFIG\"" "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMP\"" \
|
||||||
|
$CATALINA_MAIN
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
start )
|
||||||
|
eval "\"$JSVC\"" \
|
||||||
|
"$JSVC_OPTS" \
|
||||||
|
-java-home "\"$JAVA_HOME\"" \
|
||||||
|
-user $TOMCAT_USER \
|
||||||
|
-pidfile "\"$CATALINA_PID\"" \
|
||||||
|
-wait $SERVICE_START_WAIT_TIME \
|
||||||
|
-umask $UMASK \
|
||||||
|
-outfile "\"$CATALINA_OUT\"" \
|
||||||
|
-errfile "\"&1\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
"\"$CATALINA_LOGGING_CONFIG\"" "$JAVA_OPTS" "$CATALINA_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMP\"" \
|
||||||
|
$CATALINA_MAIN
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
stop )
|
||||||
|
eval "\"$JSVC\"" \
|
||||||
|
"$JSVC_OPTS" \
|
||||||
|
-stop \
|
||||||
|
-pidfile "\"$CATALINA_PID\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-Dcatalina.base="\"$CATALINA_BASE\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
-Djava.io.tmpdir="\"$CATALINA_TMP\"" \
|
||||||
|
$CATALINA_MAIN
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
version )
|
||||||
|
"$JSVC" \
|
||||||
|
-java-home "$JAVA_HOME" \
|
||||||
|
-pidfile "$CATALINA_PID" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
-errfile "&2" \
|
||||||
|
-version \
|
||||||
|
-check \
|
||||||
|
$CATALINA_MAIN
|
||||||
|
if [ "$?" = 0 ]; then
|
||||||
|
"$JAVA_BIN" \
|
||||||
|
-classpath "$CATALINA_HOME/lib/catalina.jar" \
|
||||||
|
org.apache.catalina.util.ServerInfo
|
||||||
|
fi
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "Unknown command: '$1'"
|
||||||
|
echo "Usage: $PROGRAM ( commands ... )"
|
||||||
|
echo "commands:"
|
||||||
|
echo " run Start Tomcat without detaching from console"
|
||||||
|
echo " start Start Tomcat"
|
||||||
|
echo " stop Stop Tomcat"
|
||||||
|
echo " version What version of commons daemon and Tomcat"
|
||||||
|
echo " are you running?"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
58
apache-tomcat-9.0.109/bin/digest.bat
Normal file
58
apache-tomcat-9.0.109/bin/digest.bat
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Script to digest password using the algorithm specified
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
|
||||||
|
|
||||||
|
rem Check that target executable exists
|
||||||
|
if exist "%EXECUTABLE%" goto okExec
|
||||||
|
echo Cannot find "%EXECUTABLE%"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okExec
|
||||||
|
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
60
apache-tomcat-9.0.109/bin/digest.sh
Normal file
60
apache-tomcat-9.0.109/bin/digest.sh
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Script to digest password using the algorithm specified
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Better OS/400 detection: see Bugzilla 31132
|
||||||
|
os400=false
|
||||||
|
case "`uname`" in
|
||||||
|
OS400*) os400=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
EXECUTABLE=tool-wrapper.sh
|
||||||
|
|
||||||
|
# Check that target executable exists
|
||||||
|
if $os400; then
|
||||||
|
# -x will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
eval
|
||||||
|
else
|
||||||
|
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||||
|
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||||
|
echo "The file is absent or does not have execute permission"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@"
|
114
apache-tomcat-9.0.109/bin/makebase.bat
Normal file
114
apache-tomcat-9.0.109/bin/makebase.bat
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem This script creates the directory structure required for running Tomcat
|
||||||
|
rem in a separate directory by pointing %CATALINA_BASE% to it. It copies the
|
||||||
|
rem conf directory from %CATALINA_HOME%, and creates empty directories for
|
||||||
|
rem bin, lib, logs, temp, webapps, and work.
|
||||||
|
rem
|
||||||
|
rem If the file %CATALINA_HOME%/bin/setenv.sh exists then it is copied to
|
||||||
|
rem the target directory as well.
|
||||||
|
rem
|
||||||
|
rem Usage: makebase <path-to-target-directory> [-w | --webapps]
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto EOF
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
rem first arg is the target directory
|
||||||
|
set BASE_TGT=%1
|
||||||
|
|
||||||
|
if %BASE_TGT%.==. (
|
||||||
|
rem target directory not provided; exit
|
||||||
|
echo Usage: makebase ^<path-to-target-directory^>
|
||||||
|
goto :EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
set COPY_WEBAPPS=false
|
||||||
|
|
||||||
|
rem parse args
|
||||||
|
for %%a in (%*) do (
|
||||||
|
if "%%~a"=="--webapps" (
|
||||||
|
set COPY_WEBAPPS=true
|
||||||
|
)
|
||||||
|
if "%%~a"=="-w" (
|
||||||
|
set COPY_WEBAPPS=true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist %BASE_TGT% (
|
||||||
|
rem target directory exists
|
||||||
|
echo Target directory exists
|
||||||
|
|
||||||
|
rem exit if target directory is not empty
|
||||||
|
for /F %%i in ('dir /b %BASE_TGT%\*.*') do (
|
||||||
|
echo Target directory is not empty
|
||||||
|
goto :EOF
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
rem create the target directory
|
||||||
|
mkdir %BASE_TGT%
|
||||||
|
)
|
||||||
|
|
||||||
|
rem create empty directories
|
||||||
|
for %%d in (bin, conf, lib, logs, temp, webapps, work) do (
|
||||||
|
mkdir %BASE_TGT%\%%d
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%COPY_WEBAPPS%" == "true" (
|
||||||
|
echo Copying webapps
|
||||||
|
robocopy %CATALINA_HOME%\webapps %BASE_TGT%\webapps /E > nul
|
||||||
|
rem copy conf directory recursively
|
||||||
|
robocopy %CATALINA_HOME%\conf %BASE_TGT%\conf /E > nul
|
||||||
|
) else (
|
||||||
|
rem copy conf directory without subdirectories and suppress warning
|
||||||
|
robocopy %CATALINA_HOME%\conf %BASE_TGT%\conf > nul
|
||||||
|
rem create empty ROOT directory
|
||||||
|
mkdir %BASE_TGT%\webapps\ROOT
|
||||||
|
)
|
||||||
|
|
||||||
|
rem copy setenv.bat if exists
|
||||||
|
robocopy %CATALINA_HOME%\bin %BASE_TGT%\bin setenv.bat > nul
|
||||||
|
|
||||||
|
echo Created CATALINA_BASE directory at %BASE_TGT%
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo You can launch the new instance by running:
|
||||||
|
echo set CATALINA_HOME=%CATALINA_HOME%
|
||||||
|
echo set CATALINA_BASE=%BASE_TGT%
|
||||||
|
echo %%CATALINA_HOME%%/bin/catalina.bat run
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Attention: The ports in conf\server.xml might be bound by a
|
||||||
|
echo different instance. Please review your config files
|
||||||
|
echo and update them where necessary.
|
||||||
|
echo.
|
||||||
|
|
||||||
|
:EOF
|
115
apache-tomcat-9.0.109/bin/makebase.sh
Normal file
115
apache-tomcat-9.0.109/bin/makebase.sh
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# This script creates the directory structure required for running Tomcat
|
||||||
|
# in a separate directory by pointing $CATALINA_BASE to it. It copies the
|
||||||
|
# conf directory from $CATALINA_HOME, and creates empty directories for
|
||||||
|
# bin, lib, logs, temp, webapps, and work.
|
||||||
|
#
|
||||||
|
# If the file $CATALINA_HOME/bin/setenv.sh exists then it is copied to
|
||||||
|
# the target directory as well.
|
||||||
|
#
|
||||||
|
# Usage: makebase <path-to-target-directory> [-w | --webapps]
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ]; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Get standard environment variables
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
|
||||||
|
# Only set CATALINA_HOME if not already set
|
||||||
|
[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||||
|
|
||||||
|
# first arg is the target directory
|
||||||
|
BASE_TGT=$1
|
||||||
|
|
||||||
|
if [ -z "$BASE_TGT" ]; then
|
||||||
|
# target directory not provided; exit
|
||||||
|
echo "Usage: makebase <path-to-target-directory>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
COPY_WEBAPPS=false
|
||||||
|
|
||||||
|
# parse args
|
||||||
|
while [ "$1" != "" ]; do
|
||||||
|
case $1 in
|
||||||
|
-w | --webapps)
|
||||||
|
COPY_WEBAPPS=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -d "$BASE_TGT" ]; then
|
||||||
|
# target directory exists
|
||||||
|
echo "Target directory exists"
|
||||||
|
|
||||||
|
# exit if target directory is not empty
|
||||||
|
[ "`ls -A "$BASE_TGT"`" ] && \
|
||||||
|
echo "Target directory is not empty" && \
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# create the target directory
|
||||||
|
mkdir -p "$BASE_TGT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for dir in bin conf lib logs temp webapps work;
|
||||||
|
do
|
||||||
|
# create empty directories
|
||||||
|
mkdir "$BASE_TGT/$dir"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$COPY_WEBAPPS" = true ]; then
|
||||||
|
echo "Copying webapps"
|
||||||
|
cp -r "$CATALINA_HOME/webapps" "$BASE_TGT/"
|
||||||
|
# copy conf directory recursively
|
||||||
|
cp -r "$CATALINA_HOME/conf" "$BASE_TGT/"
|
||||||
|
else
|
||||||
|
# copy conf directory without subdirectories and suppress warning
|
||||||
|
cp "${CATALINA_HOME}/conf"/* "$BASE_TGT/conf" 2> /dev/null
|
||||||
|
# create empty ROOT directory
|
||||||
|
mkdir "$BASE_TGT/webapps/ROOT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# copy setenv.sh if exists
|
||||||
|
[ -f "$CATALINA_HOME/bin/setenv.sh" ] && \
|
||||||
|
cp "$CATALINA_HOME/bin/setenv.sh" "$BASE_TGT/bin/"
|
||||||
|
|
||||||
|
echo "Created CATALINA_BASE directory at $BASE_TGT"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "You can launch the new instance by running:"
|
||||||
|
echo " export CATALINA_HOME=$CATALINA_HOME"
|
||||||
|
echo " export CATALINA_BASE=$BASE_TGT"
|
||||||
|
echo " \$CATALINA_HOME/bin/catalina.sh run"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Attention: The ports in conf/server.xml might be bound by a "
|
||||||
|
echo " different instance. Please review your config files "
|
||||||
|
echo " and update them as necessary."
|
||||||
|
echo
|
105
apache-tomcat-9.0.109/bin/setclasspath.bat
Normal file
105
apache-tomcat-9.0.109/bin/setclasspath.bat
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
|
||||||
|
rem are valid and consistent with the selected start-up options and set up the
|
||||||
|
rem endorsed directory.
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
rem Make sure prerequisite environment variables are set
|
||||||
|
|
||||||
|
rem In debug mode we need a real JDK (JAVA_HOME)
|
||||||
|
if ""%1"" == ""debug"" goto needJavaHome
|
||||||
|
|
||||||
|
rem Otherwise either JRE or JDK are fine
|
||||||
|
if not "%JRE_HOME%" == "" goto gotJreHome
|
||||||
|
if not "%JAVA_HOME%" == "" goto gotJavaHome
|
||||||
|
echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
|
||||||
|
echo At least one of these environment variable is needed to run this program
|
||||||
|
goto exit
|
||||||
|
|
||||||
|
:needJavaHome
|
||||||
|
rem Check if we have a usable JDK
|
||||||
|
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||||
|
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||||
|
if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
|
||||||
|
if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
|
||||||
|
set "JRE_HOME=%JAVA_HOME%"
|
||||||
|
goto okJava
|
||||||
|
|
||||||
|
:noJavaHome
|
||||||
|
echo The JAVA_HOME environment variable is not defined correctly.
|
||||||
|
echo JAVA_HOME=%JAVA_HOME%
|
||||||
|
echo It is needed to run this program in debug mode.
|
||||||
|
echo NB: JAVA_HOME should point to a JDK not a JRE.
|
||||||
|
goto exit
|
||||||
|
|
||||||
|
:gotJavaHome
|
||||||
|
rem No JRE given, check if JAVA_HOME is usable as JRE_HOME
|
||||||
|
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHomeAsJre
|
||||||
|
rem Use JAVA_HOME as JRE_HOME
|
||||||
|
set "JRE_HOME=%JAVA_HOME%"
|
||||||
|
goto okJava
|
||||||
|
|
||||||
|
:noJavaHomeAsJre
|
||||||
|
echo The JAVA_HOME environment variable is not defined correctly.
|
||||||
|
echo JAVA_HOME=%JAVA_HOME%
|
||||||
|
echo NB: JAVA_HOME should point to a JDK not a JRE.
|
||||||
|
goto exit
|
||||||
|
|
||||||
|
:gotJreHome
|
||||||
|
rem Check if we have a usable JRE
|
||||||
|
if not exist "%JRE_HOME%\bin\java.exe" goto noJreHome
|
||||||
|
goto okJava
|
||||||
|
|
||||||
|
:noJreHome
|
||||||
|
rem Needed at least a JRE
|
||||||
|
echo The JRE_HOME environment variable is not defined correctly
|
||||||
|
echo JRE_HOME=%JRE_HOME%
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto exit
|
||||||
|
|
||||||
|
:okJava
|
||||||
|
rem Don't override the endorsed dir if the user has set it previously
|
||||||
|
if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir
|
||||||
|
rem Java 9 no longer supports the java.endorsed.dirs
|
||||||
|
rem system property. Only try to use it if
|
||||||
|
rem CATALINA_HOME/endorsed exists.
|
||||||
|
if not exist "%CATALINA_HOME%\endorsed" goto gotEndorseddir
|
||||||
|
set "JAVA_ENDORSED_DIRS=%CATALINA_HOME%\endorsed"
|
||||||
|
:gotEndorseddir
|
||||||
|
|
||||||
|
rem Don't override _RUNJAVA if the user has set it previously
|
||||||
|
if not "%_RUNJAVA%" == "" goto gotRunJava
|
||||||
|
rem Set standard command for invoking Java.
|
||||||
|
rem Also note the quoting as JRE_HOME may contain spaces.
|
||||||
|
set "_RUNJAVA=%JRE_HOME%\bin\java.exe"
|
||||||
|
:gotRunJava
|
||||||
|
|
||||||
|
rem Don't override _RUNJDB if the user has set it previously
|
||||||
|
rem Also note the quoting as JAVA_HOME may contain spaces.
|
||||||
|
if not "%_RUNJDB%" == "" goto gotRunJdb
|
||||||
|
set "_RUNJDB=%JAVA_HOME%\bin\jdb.exe"
|
||||||
|
:gotRunJdb
|
||||||
|
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:exit
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:end
|
||||||
|
exit /b 0
|
116
apache-tomcat-9.0.109/bin/setclasspath.sh
Normal file
116
apache-tomcat-9.0.109/bin/setclasspath.sh
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
|
||||||
|
# are valid and consistent with the selected start-up options and set up the
|
||||||
|
# endorsed directory.
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Make sure prerequisite environment variables are set
|
||||||
|
if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
|
||||||
|
if $darwin; then
|
||||||
|
# Bugzilla 54390
|
||||||
|
if [ -x '/usr/libexec/java_home' ] ; then
|
||||||
|
export JAVA_HOME=`/usr/libexec/java_home`
|
||||||
|
# Bugzilla 37284 (reviewed).
|
||||||
|
elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
|
||||||
|
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVA_PATH=`which java 2>/dev/null`
|
||||||
|
if [ "x$JAVA_PATH" != "x" ]; then
|
||||||
|
JAVA_PATH=`dirname "$JAVA_PATH" 2>/dev/null`
|
||||||
|
JRE_HOME=`dirname "$JAVA_PATH" 2>/dev/null`
|
||||||
|
fi
|
||||||
|
if [ "x$JRE_HOME" = "x" ]; then
|
||||||
|
# XXX: Should we try other locations?
|
||||||
|
if [ -x /usr/bin/java ]; then
|
||||||
|
JRE_HOME=/usr
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
|
||||||
|
echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
|
||||||
|
echo "At least one of these environment variable is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$JAVA_HOME" ] && [ "$1" = "debug" ]; then
|
||||||
|
echo "JAVA_HOME should point to a JDK in order to run in debug mode."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we're running under jdb, we need a full jdk.
|
||||||
|
if [ "$1" = "debug" ] ; then
|
||||||
|
if [ "$os400" = "true" ]; then
|
||||||
|
if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/javac ]; then
|
||||||
|
echo "The JAVA_HOME environment variable is not defined correctly"
|
||||||
|
echo "JAVA_HOME=$JAVA_HOME"
|
||||||
|
echo "This environment variable is needed to run this program"
|
||||||
|
echo "NB: JAVA_HOME should point to a JDK not a JRE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/jdb ] || [ ! -x "$JAVA_HOME"/bin/javac ]; then
|
||||||
|
echo "The JAVA_HOME environment variable is not defined correctly"
|
||||||
|
echo "JAVA_HOME=$JAVA_HOME"
|
||||||
|
echo "This environment variable is needed to run this program"
|
||||||
|
echo "NB: JAVA_HOME should point to a JDK not a JRE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JRE_HOME" ]; then
|
||||||
|
# JAVA_HOME_MUST be set
|
||||||
|
if [ ! -x "$JAVA_HOME"/bin/java ]; then
|
||||||
|
echo "The JAVA_HOME environment variable is not defined correctly"
|
||||||
|
echo "JAVA_HOME=$JAVA_HOME"
|
||||||
|
echo "This environment variable is needed to run this program"
|
||||||
|
echo "NB: JAVA_HOME should point to a JDK not a JRE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
JRE_HOME="$JAVA_HOME"
|
||||||
|
else
|
||||||
|
if [ ! -x "$JRE_HOME"/bin/java ]; then
|
||||||
|
echo "The JRE_HOME environment variable is not defined correctly"
|
||||||
|
echo "JRE_HOME=$JRE_HOME"
|
||||||
|
echo "This environment variable is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Don't override the endorsed dir if the user has set it previously
|
||||||
|
if [ -z "$JAVA_ENDORSED_DIRS" ]; then
|
||||||
|
# Java 9 no longer supports the java.endorsed.dirs
|
||||||
|
# system property. Only try to use it if
|
||||||
|
# CATALINA_HOME/endorsed exists.
|
||||||
|
if [ -d "$CATALINA_HOME"/endorsed ]; then
|
||||||
|
JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set standard commands for invoking Java, if not already set.
|
||||||
|
if [ -z "$_RUNJAVA" ]; then
|
||||||
|
_RUNJAVA="$JRE_HOME"/bin/java
|
||||||
|
fi
|
||||||
|
if [ "$os400" != "true" ]; then
|
||||||
|
if [ -z "$_RUNJDB" ]; then
|
||||||
|
_RUNJDB="$JAVA_HOME"/bin/jdb
|
||||||
|
fi
|
||||||
|
fi
|
58
apache-tomcat-9.0.109/bin/shutdown.bat
Normal file
58
apache-tomcat-9.0.109/bin/shutdown.bat
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Stop script for the CATALINA Server
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
|
||||||
|
|
||||||
|
rem Check that target executable exists
|
||||||
|
if exist "%EXECUTABLE%" goto okExec
|
||||||
|
echo Cannot find "%EXECUTABLE%"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okExec
|
||||||
|
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
60
apache-tomcat-9.0.109/bin/shutdown.sh
Normal file
60
apache-tomcat-9.0.109/bin/shutdown.sh
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Stop script for the CATALINA Server
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Better OS/400 detection: see Bugzilla 31132
|
||||||
|
os400=false
|
||||||
|
case "`uname`" in
|
||||||
|
OS400*) os400=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
EXECUTABLE=catalina.sh
|
||||||
|
|
||||||
|
# Check that target executable exists
|
||||||
|
if $os400; then
|
||||||
|
# -x will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
eval
|
||||||
|
else
|
||||||
|
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||||
|
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||||
|
echo "The file is absent or does not have execute permission"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
|
58
apache-tomcat-9.0.109/bin/startup.bat
Normal file
58
apache-tomcat-9.0.109/bin/startup.bat
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Start script for the CATALINA Server
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
|
||||||
|
|
||||||
|
rem Check that target executable exists
|
||||||
|
if exist "%EXECUTABLE%" goto okExec
|
||||||
|
echo Cannot find "%EXECUTABLE%"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okExec
|
||||||
|
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
60
apache-tomcat-9.0.109/bin/startup.sh
Normal file
60
apache-tomcat-9.0.109/bin/startup.sh
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Start Script for the CATALINA Server
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Better OS/400 detection: see Bugzilla 31132
|
||||||
|
os400=false
|
||||||
|
case "`uname`" in
|
||||||
|
OS400*) os400=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
EXECUTABLE=catalina.sh
|
||||||
|
|
||||||
|
# Check that target executable exists
|
||||||
|
if $os400; then
|
||||||
|
# -x will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
eval
|
||||||
|
else
|
||||||
|
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||||
|
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||||
|
echo "The file is absent or does not have execute permission"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
|
BIN
apache-tomcat-9.0.109/bin/tomcat-juli.jar
Normal file
BIN
apache-tomcat-9.0.109/bin/tomcat-juli.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/bin/tomcat-native.tar.gz
Normal file
BIN
apache-tomcat-9.0.109/bin/tomcat-native.tar.gz
Normal file
Binary file not shown.
110
apache-tomcat-9.0.109/bin/tool-wrapper.bat
Normal file
110
apache-tomcat-9.0.109/bin/tool-wrapper.bat
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Wrapper script for command line tools
|
||||||
|
rem
|
||||||
|
rem Environment Variable Prerequisites
|
||||||
|
rem
|
||||||
|
rem CATALINA_HOME May point at your Catalina "build" directory.
|
||||||
|
rem
|
||||||
|
rem TOOL_OPTS (Optional) Java runtime options.
|
||||||
|
rem
|
||||||
|
rem JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
rem Using JRE_HOME instead works as well.
|
||||||
|
rem
|
||||||
|
rem JRE_HOME Must point at your Java Runtime installation.
|
||||||
|
rem Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
|
||||||
|
rem are both set, JRE_HOME is used.
|
||||||
|
rem
|
||||||
|
rem JAVA_OPTS (Optional) Java runtime options.
|
||||||
|
rem
|
||||||
|
rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories
|
||||||
|
rem containing some jars in order to allow replacement of APIs
|
||||||
|
rem created outside of the JCP (i.e. DOM and SAX from W3C).
|
||||||
|
rem It can also be used to update the XML parser implementation.
|
||||||
|
rem This is only supported for Java <= 8.
|
||||||
|
rem Defaults to $CATALINA_HOME/endorsed.
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
rem Ensure that any user defined CLASSPATH variables are not used on startup,
|
||||||
|
rem but allow them to be specified in setenv.bat, in rare case when it is needed.
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
|
rem Get standard environment variables
|
||||||
|
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
|
||||||
|
|
||||||
|
rem Get standard Java environment variables
|
||||||
|
if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
|
||||||
|
echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okSetclasspath
|
||||||
|
call "%CATALINA_HOME%\bin\setclasspath.bat" %1
|
||||||
|
if errorlevel 1 goto end
|
||||||
|
|
||||||
|
rem Add on extra jar files to CLASSPATH
|
||||||
|
rem Note that there are no quotes as we do not want to introduce random
|
||||||
|
rem quotes into the CLASSPATH
|
||||||
|
if "%CLASSPATH%" == "" goto emptyClasspath
|
||||||
|
set "CLASSPATH=%CLASSPATH%;"
|
||||||
|
:emptyClasspath
|
||||||
|
set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\tomcat-util.jar"
|
||||||
|
|
||||||
|
set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||||
|
|
||||||
|
rem Java 9 no longer supports the java.endorsed.dirs
|
||||||
|
rem system property. Only try to use it if
|
||||||
|
rem JAVA_ENDORSED_DIRS was explicitly set
|
||||||
|
rem or CATALINA_HOME/endorsed exists.
|
||||||
|
set ENDORSED_PROP=ignore.endorsed.dirs
|
||||||
|
if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar
|
||||||
|
set ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
goto doneEndorsed
|
||||||
|
:noEndorsedVar
|
||||||
|
if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed
|
||||||
|
set ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
:doneEndorsed
|
||||||
|
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
153
apache-tomcat-9.0.109/bin/tool-wrapper.sh
Normal file
153
apache-tomcat-9.0.109/bin/tool-wrapper.sh
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Wrapper script for command line tools
|
||||||
|
#
|
||||||
|
# Environment Variable Prerequisites
|
||||||
|
#
|
||||||
|
# CATALINA_HOME May point at your Catalina "build" directory.
|
||||||
|
#
|
||||||
|
# TOOL_OPTS (Optional) Java runtime options.
|
||||||
|
#
|
||||||
|
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
# Using JRE_HOME instead works as well.
|
||||||
|
#
|
||||||
|
# JRE_HOME Must point at your Java Runtime installation.
|
||||||
|
# Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
|
||||||
|
# are both set, JRE_HOME is used.
|
||||||
|
#
|
||||||
|
# JAVA_OPTS (Optional) Java runtime options.
|
||||||
|
#
|
||||||
|
# JAVA_ENDORSED_DIRS (Optional) Lists of of colon separated directories
|
||||||
|
# containing some jars in order to allow replacement of APIs
|
||||||
|
# created outside of the JCP (i.e. DOM and SAX from W3C).
|
||||||
|
# It can also be used to update the XML parser implementation.
|
||||||
|
# This is only supported for Java <= 8.
|
||||||
|
# Defaults to $CATALINA_HOME/endorsed.
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false
|
||||||
|
darwin=false
|
||||||
|
os400=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true;;
|
||||||
|
Darwin*) darwin=true;;
|
||||||
|
OS400*) os400=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ]; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Get standard environment variables
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
|
||||||
|
# Only set CATALINA_HOME if not already set
|
||||||
|
[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
|
||||||
|
|
||||||
|
# Ensure that any user defined CLASSPATH variables are not used on startup,
|
||||||
|
# but allow them to be specified in setenv.sh, in rare case when it is needed.
|
||||||
|
CLASSPATH=
|
||||||
|
|
||||||
|
if [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
|
||||||
|
. "$CATALINA_HOME/bin/setenv.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
|
||||||
|
[ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For OS400
|
||||||
|
if $os400; then
|
||||||
|
# Set job priority to standard for interactive (interactive - 6) by using
|
||||||
|
# the interactive priority - 6, the helper threads that respond to requests
|
||||||
|
# will be running at the same priority as interactive jobs.
|
||||||
|
COMMAND='chgjob job('$JOBNAME') runpty(6)'
|
||||||
|
system $COMMAND
|
||||||
|
|
||||||
|
# Enable multi threading
|
||||||
|
export QIBM_MULTI_THREADED=Y
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get standard Java environment variables
|
||||||
|
if $os400; then
|
||||||
|
# -r will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||||
|
else
|
||||||
|
if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
|
||||||
|
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||||
|
else
|
||||||
|
echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add on extra jar files to CLASSPATH
|
||||||
|
if [ ! -z "$CLASSPATH" ] ; then
|
||||||
|
CLASSPATH="$CLASSPATH":
|
||||||
|
fi
|
||||||
|
CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/tomcat-juli.jar:"$CATALINA_HOME"/lib/servlet-api.jar:"$CATALINA_HOME"/lib/tomcat-util.jar
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
|
||||||
|
JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
|
||||||
|
CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$JAVA_ENDORSED_DIRS" ] && JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Java 9 no longer supports the java.endorsed.dirs
|
||||||
|
# system property. Only try to use it if
|
||||||
|
# JAVA_ENDORSED_DIRS was explicitly set
|
||||||
|
# or CATALINA_HOME/endorsed exists.
|
||||||
|
ENDORSED_PROP=ignore.endorsed.dirs
|
||||||
|
if [ -n "$JAVA_ENDORSED_DIRS" ]; then
|
||||||
|
ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
fi
|
||||||
|
if [ -d "$CATALINA_HOME/endorsed" ]; then
|
||||||
|
ENDORSED_PROP=java.endorsed.dirs
|
||||||
|
fi
|
||||||
|
|
||||||
|
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
|
||||||
|
|
||||||
|
# ----- Execute The Requested Command -----------------------------------------
|
||||||
|
|
||||||
|
eval exec "\"$_RUNJAVA\"" "$JAVA_OPTS" "$TOOL_OPTS" \
|
||||||
|
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
|
||||||
|
-classpath "\"$CLASSPATH\"" \
|
||||||
|
-Dcatalina.home="\"$CATALINA_HOME\"" \
|
||||||
|
org.apache.catalina.startup.Tool "$@"
|
58
apache-tomcat-9.0.109/bin/version.bat
Normal file
58
apache-tomcat-9.0.109/bin/version.bat
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
@echo off
|
||||||
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
rem contributor license agreements. See the NOTICE file distributed with
|
||||||
|
rem this work for additional information regarding copyright ownership.
|
||||||
|
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
rem (the "License"); you may not use this file except in compliance with
|
||||||
|
rem the License. You may obtain a copy of the License at
|
||||||
|
rem
|
||||||
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
rem
|
||||||
|
rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
rem See the License for the specific language governing permissions and
|
||||||
|
rem limitations under the License.
|
||||||
|
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
rem Version script for the CATALINA Server
|
||||||
|
rem ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
rem Guess CATALINA_HOME if not defined
|
||||||
|
set "CURRENT_DIR=%cd%"
|
||||||
|
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||||
|
set "CATALINA_HOME=%CURRENT_DIR%"
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
cd ..
|
||||||
|
set "CATALINA_HOME=%cd%"
|
||||||
|
cd "%CURRENT_DIR%"
|
||||||
|
:gotHome
|
||||||
|
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||||
|
echo The CATALINA_HOME environment variable is not defined correctly
|
||||||
|
echo This environment variable is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okHome
|
||||||
|
|
||||||
|
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
|
||||||
|
|
||||||
|
rem Check that target executable exists
|
||||||
|
if exist "%EXECUTABLE%" goto okExec
|
||||||
|
echo Cannot find "%EXECUTABLE%"
|
||||||
|
echo This file is needed to run this program
|
||||||
|
goto end
|
||||||
|
:okExec
|
||||||
|
|
||||||
|
rem Get remaining unshifted command line arguments and save them in the
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
:setArgs
|
||||||
|
if ""%1""=="""" goto doneSetArgs
|
||||||
|
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||||
|
shift
|
||||||
|
goto setArgs
|
||||||
|
:doneSetArgs
|
||||||
|
|
||||||
|
call "%EXECUTABLE%" version %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
60
apache-tomcat-9.0.109/bin/version.sh
Normal file
60
apache-tomcat-9.0.109/bin/version.sh
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Version Script for the CATALINA Server
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Better OS/400 detection: see Bugzilla 31132
|
||||||
|
os400=false
|
||||||
|
case "`uname`" in
|
||||||
|
OS400*) os400=true;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# resolve links - $0 may be a softlink
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
EXECUTABLE=catalina.sh
|
||||||
|
|
||||||
|
# Check that target executable exists
|
||||||
|
if $os400; then
|
||||||
|
# -x will Only work on the os400 if the files are:
|
||||||
|
# 1. owned by the user
|
||||||
|
# 2. owned by the PRIMARY group of the user
|
||||||
|
# this will not work if the user belongs in secondary groups
|
||||||
|
eval
|
||||||
|
else
|
||||||
|
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||||
|
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||||
|
echo "The file is absent or does not have execute permission"
|
||||||
|
echo "This file is needed to run this program"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$PRGDIR"/"$EXECUTABLE" version "$@"
|
264
apache-tomcat-9.0.109/conf/catalina.policy
Normal file
264
apache-tomcat-9.0.109/conf/catalina.policy
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// catalina.policy - Security Policy Permissions for Tomcat
|
||||||
|
//
|
||||||
|
// This file contains a default set of security policies to be enforced (by the
|
||||||
|
// JVM) when Catalina is executed with the "-security" option. In addition
|
||||||
|
// to the permissions granted here, the following additional permissions are
|
||||||
|
// granted to each web application:
|
||||||
|
//
|
||||||
|
// * Read access to the web application's document root directory
|
||||||
|
// * Read, write and delete access to the web application's working directory
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
// ========== SYSTEM CODE PERMISSIONS =========================================
|
||||||
|
|
||||||
|
|
||||||
|
// These permissions apply to javac
|
||||||
|
grant codeBase "file:${java.home}/lib/-" {
|
||||||
|
permission java.security.AllPermission;
|
||||||
|
};
|
||||||
|
|
||||||
|
// These permissions apply to all shared system extensions
|
||||||
|
grant codeBase "file:${java.home}/jre/lib/ext/-" {
|
||||||
|
permission java.security.AllPermission;
|
||||||
|
};
|
||||||
|
|
||||||
|
// These permissions apply to javac when ${java.home} points at $JAVA_HOME/jre
|
||||||
|
grant codeBase "file:${java.home}/../lib/-" {
|
||||||
|
permission java.security.AllPermission;
|
||||||
|
};
|
||||||
|
|
||||||
|
// These permissions apply to all shared system extensions when
|
||||||
|
// ${java.home} points at $JAVA_HOME/jre
|
||||||
|
grant codeBase "file:${java.home}/lib/ext/-" {
|
||||||
|
permission java.security.AllPermission;
|
||||||
|
};
|
||||||
|
|
||||||
|
// This permission is required when using javac to compile JSPs on Java 9
|
||||||
|
// onwards
|
||||||
|
//grant codeBase "jrt:/jdk.compiler" {
|
||||||
|
// permission java.security.AllPermission;
|
||||||
|
//};
|
||||||
|
|
||||||
|
|
||||||
|
// ========== CATALINA CODE PERMISSIONS =======================================
|
||||||
|
|
||||||
|
// These permissions apply to the daemon code
|
||||||
|
grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
|
||||||
|
permission java.security.AllPermission;
|
||||||
|
};
|
||||||
|
|
||||||
|
// These permissions apply to the logging API
|
||||||
|
// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home},
|
||||||
|
// update this section accordingly.
|
||||||
|
// grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
|
||||||
|
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
|
||||||
|
permission java.io.FilePermission
|
||||||
|
"${java.home}${file.separator}lib${file.separator}logging.properties", "read";
|
||||||
|
|
||||||
|
permission java.io.FilePermission
|
||||||
|
"${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
|
||||||
|
permission java.io.FilePermission
|
||||||
|
"${catalina.base}${file.separator}logs", "read, write";
|
||||||
|
permission java.io.FilePermission
|
||||||
|
"${catalina.base}${file.separator}logs${file.separator}*", "read, write, delete";
|
||||||
|
|
||||||
|
permission java.lang.RuntimePermission "shutdownHooks";
|
||||||
|
permission java.lang.RuntimePermission "getClassLoader";
|
||||||
|
permission java.lang.RuntimePermission "setContextClassLoader";
|
||||||
|
|
||||||
|
permission java.lang.management.ManagementPermission "monitor";
|
||||||
|
|
||||||
|
permission java.util.logging.LoggingPermission "control";
|
||||||
|
|
||||||
|
permission java.util.PropertyPermission "java.util.logging.config.class", "read";
|
||||||
|
permission java.util.PropertyPermission "java.util.logging.config.file", "read";
|
||||||
|
permission java.util.PropertyPermission "org.apache.juli.AsyncMaxRecordCount", "read";
|
||||||
|
permission java.util.PropertyPermission "org.apache.juli.AsyncOverflowDropType", "read";
|
||||||
|
permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read";
|
||||||
|
permission java.util.PropertyPermission "catalina.base", "read";
|
||||||
|
|
||||||
|
// Note: To enable per context logging configuration, permit read access to
|
||||||
|
// the appropriate file. Be sure that the logging configuration is
|
||||||
|
// secure before enabling such access.
|
||||||
|
// E.g. for the examples web application (uncomment and unwrap
|
||||||
|
// the following to be on a single line):
|
||||||
|
// permission java.io.FilePermission "${catalina.base}${file.separator}
|
||||||
|
// webapps${file.separator}examples${file.separator}WEB-INF
|
||||||
|
// ${file.separator}classes${file.separator}logging.properties", "read";
|
||||||
|
};
|
||||||
|
|
||||||
|
// These permissions apply to the server startup code
|
||||||
|
grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
|
||||||
|
permission java.security.AllPermission;
|
||||||
|
};
|
||||||
|
|
||||||
|
// These permissions apply to the servlet API classes
|
||||||
|
// and those that are shared across all class loaders
|
||||||
|
// located in the "lib" directory
|
||||||
|
grant codeBase "file:${catalina.home}/lib/-" {
|
||||||
|
permission java.security.AllPermission;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// If using a per instance lib directory, i.e. ${catalina.base}/lib,
|
||||||
|
// then the following permission will need to be uncommented
|
||||||
|
// grant codeBase "file:${catalina.base}/lib/-" {
|
||||||
|
// permission java.security.AllPermission;
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
// ========== WEB APPLICATION PERMISSIONS =====================================
|
||||||
|
|
||||||
|
|
||||||
|
// These permissions are granted by default to all web applications
|
||||||
|
// In addition, a web application will be given a read FilePermission
|
||||||
|
// for all files and directories in its document root.
|
||||||
|
grant {
|
||||||
|
// Required for JNDI lookup of named JDBC DataSource's and
|
||||||
|
// javamail named MimePart DataSource used to send mail
|
||||||
|
permission java.util.PropertyPermission "java.home", "read";
|
||||||
|
permission java.util.PropertyPermission "java.naming.*", "read";
|
||||||
|
permission java.util.PropertyPermission "javax.sql.*", "read";
|
||||||
|
|
||||||
|
// OS Specific properties to allow read access
|
||||||
|
permission java.util.PropertyPermission "os.name", "read";
|
||||||
|
permission java.util.PropertyPermission "os.version", "read";
|
||||||
|
permission java.util.PropertyPermission "os.arch", "read";
|
||||||
|
permission java.util.PropertyPermission "file.separator", "read";
|
||||||
|
permission java.util.PropertyPermission "path.separator", "read";
|
||||||
|
permission java.util.PropertyPermission "line.separator", "read";
|
||||||
|
|
||||||
|
// JVM properties to allow read access
|
||||||
|
permission java.util.PropertyPermission "java.version", "read";
|
||||||
|
permission java.util.PropertyPermission "java.vendor", "read";
|
||||||
|
permission java.util.PropertyPermission "java.vendor.url", "read";
|
||||||
|
permission java.util.PropertyPermission "java.class.version", "read";
|
||||||
|
permission java.util.PropertyPermission "java.specification.version", "read";
|
||||||
|
permission java.util.PropertyPermission "java.specification.vendor", "read";
|
||||||
|
permission java.util.PropertyPermission "java.specification.name", "read";
|
||||||
|
|
||||||
|
permission java.util.PropertyPermission "java.vm.specification.version", "read";
|
||||||
|
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
|
||||||
|
permission java.util.PropertyPermission "java.vm.specification.name", "read";
|
||||||
|
permission java.util.PropertyPermission "java.vm.version", "read";
|
||||||
|
permission java.util.PropertyPermission "java.vm.vendor", "read";
|
||||||
|
permission java.util.PropertyPermission "java.vm.name", "read";
|
||||||
|
|
||||||
|
// Required for OpenJMX
|
||||||
|
permission java.lang.RuntimePermission "getAttribute";
|
||||||
|
|
||||||
|
// Allow read of JAXP compliant XML parser debug
|
||||||
|
permission java.util.PropertyPermission "jaxp.debug", "read";
|
||||||
|
|
||||||
|
// All JSPs need to be able to read this package
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat";
|
||||||
|
|
||||||
|
// Precompiled JSPs need access to these packages.
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
|
||||||
|
permission java.lang.RuntimePermission
|
||||||
|
"accessClassInPackage.org.apache.jasper.runtime.*";
|
||||||
|
|
||||||
|
// Applications using WebSocket need to be able to access these packages
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// The Manager application needs access to the following packages to support the
|
||||||
|
// session display functionality. It also requires the custom Tomcat
|
||||||
|
// DeployXmlPermission to enable the use of META-INF/context.xml
|
||||||
|
// These settings support the following configurations:
|
||||||
|
// - default CATALINA_HOME == CATALINA_BASE
|
||||||
|
// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
|
||||||
|
// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
|
||||||
|
grant codeBase "file:${catalina.base}/webapps/manager/-" {
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
|
||||||
|
permission org.apache.catalina.security.DeployXmlPermission "manager";
|
||||||
|
};
|
||||||
|
grant codeBase "file:${catalina.home}/webapps/manager/-" {
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
|
||||||
|
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
|
||||||
|
permission org.apache.catalina.security.DeployXmlPermission "manager";
|
||||||
|
};
|
||||||
|
|
||||||
|
// The Host Manager application needs the custom Tomcat DeployXmlPermission to
|
||||||
|
// enable the use of META-INF/context.xml
|
||||||
|
// These settings support the following configurations:
|
||||||
|
// - default CATALINA_HOME == CATALINA_BASE
|
||||||
|
// - CATALINA_HOME != CATALINA_BASE, per instance Host Manager in CATALINA_BASE
|
||||||
|
// - CATALINA_HOME != CATALINA_BASE, shared Host Manager in CATALINA_HOME
|
||||||
|
grant codeBase "file:${catalina.base}/webapps/host-manager/-" {
|
||||||
|
permission org.apache.catalina.security.DeployXmlPermission "host-manager";
|
||||||
|
};
|
||||||
|
grant codeBase "file:${catalina.home}/webapps/host-manager/-" {
|
||||||
|
permission org.apache.catalina.security.DeployXmlPermission "host-manager";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// You can assign additional permissions to particular web applications by
|
||||||
|
// adding additional "grant" entries here, based on the code base for that
|
||||||
|
// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
|
||||||
|
//
|
||||||
|
// Different permissions can be granted to JSP pages, classes loaded from
|
||||||
|
// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
|
||||||
|
// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
|
||||||
|
//
|
||||||
|
// For instance, assume that the standard "examples" application
|
||||||
|
// included a JDBC driver that needed to establish a network connection to the
|
||||||
|
// corresponding database and used the scrape taglib to get the weather from
|
||||||
|
// the NOAA web server. You might create a "grant" entries like this:
|
||||||
|
//
|
||||||
|
// The permissions granted to the context root directory apply to JSP pages.
|
||||||
|
// grant codeBase "file:${catalina.base}/webapps/examples/-" {
|
||||||
|
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
|
||||||
|
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// The permissions granted to the context WEB-INF/classes directory
|
||||||
|
// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" {
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// The permission granted to your JDBC driver
|
||||||
|
// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
|
||||||
|
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
|
||||||
|
// };
|
||||||
|
// The permission granted to the scrape taglib
|
||||||
|
// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
|
||||||
|
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
|
||||||
|
// };
|
||||||
|
|
||||||
|
// To grant permissions for web applications using packed WAR files, use the
|
||||||
|
// Tomcat specific WAR url scheme.
|
||||||
|
//
|
||||||
|
// The permissions granted to the entire web application
|
||||||
|
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/-" {
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// The permissions granted to a specific JAR
|
||||||
|
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
|
||||||
|
// };
|
220
apache-tomcat-9.0.109/conf/catalina.properties
Normal file
220
apache-tomcat-9.0.109/conf/catalina.properties
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
#
|
||||||
|
# List of comma-separated packages that start with or equal this string
|
||||||
|
# will cause a security exception to be thrown when
|
||||||
|
# passed to checkPackageAccess unless the
|
||||||
|
# corresponding RuntimePermission ("accessClassInPackage."+package) has
|
||||||
|
# been granted.
|
||||||
|
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
|
||||||
|
#
|
||||||
|
# List of comma-separated packages that start with or equal this string
|
||||||
|
# will cause a security exception to be thrown when
|
||||||
|
# passed to checkPackageDefinition unless the
|
||||||
|
# corresponding RuntimePermission ("defineClassInPackage."+package) has
|
||||||
|
# been granted.
|
||||||
|
#
|
||||||
|
# by default, no packages are restricted for definition, and none of
|
||||||
|
# the class loaders supplied with the JDK call checkPackageDefinition.
|
||||||
|
#
|
||||||
|
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
|
||||||
|
org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
|
||||||
|
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# List of comma-separated paths defining the contents of the "common"
|
||||||
|
# classloader. Prefixes should be used to define what is the repository type.
|
||||||
|
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
|
||||||
|
# If left as blank,the JVM system loader will be used as Catalina's "common"
|
||||||
|
# loader.
|
||||||
|
# Examples:
|
||||||
|
# "foo": Add this folder as a class repository
|
||||||
|
# "foo/*.jar": Add all the JARs of the specified folder as class
|
||||||
|
# repositories
|
||||||
|
# "foo/bar.jar": Add bar.jar as a class repository
|
||||||
|
#
|
||||||
|
# Note: Values are enclosed in double quotes ("...") in case either the
|
||||||
|
# ${catalina.base} path or the ${catalina.home} path contains a comma.
|
||||||
|
# Because double quotes are used for quoting, the double quote character
|
||||||
|
# may not appear in a path.
|
||||||
|
common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"
|
||||||
|
|
||||||
|
#
|
||||||
|
# List of comma-separated paths defining the contents of the "server"
|
||||||
|
# classloader. Prefixes should be used to define what is the repository type.
|
||||||
|
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
|
||||||
|
# If left as blank, the "common" loader will be used as Catalina's "server"
|
||||||
|
# loader.
|
||||||
|
# Examples:
|
||||||
|
# "foo": Add this folder as a class repository
|
||||||
|
# "foo/*.jar": Add all the JARs of the specified folder as class
|
||||||
|
# repositories
|
||||||
|
# "foo/bar.jar": Add bar.jar as a class repository
|
||||||
|
#
|
||||||
|
# Note: Values may be enclosed in double quotes ("...") in case either the
|
||||||
|
# ${catalina.base} path or the ${catalina.home} path contains a comma.
|
||||||
|
# Because double quotes are used for quoting, the double quote character
|
||||||
|
# may not appear in a path.
|
||||||
|
server.loader=
|
||||||
|
|
||||||
|
#
|
||||||
|
# List of comma-separated paths defining the contents of the "shared"
|
||||||
|
# classloader. Prefixes should be used to define what is the repository type.
|
||||||
|
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
|
||||||
|
# the "common" loader will be used as Catalina's "shared" loader.
|
||||||
|
# Examples:
|
||||||
|
# "foo": Add this folder as a class repository
|
||||||
|
# "foo/*.jar": Add all the JARs of the specified folder as class
|
||||||
|
# repositories
|
||||||
|
# "foo/bar.jar": Add bar.jar as a class repository
|
||||||
|
# Please note that for single jars, e.g. bar.jar, you need the URL form
|
||||||
|
# starting with file:.
|
||||||
|
#
|
||||||
|
# Note: Values may be enclosed in double quotes ("...") in case either the
|
||||||
|
# ${catalina.base} path or the ${catalina.home} path contains a comma.
|
||||||
|
# Because double quotes are used for quoting, the double quote character
|
||||||
|
# may not appear in a path.
|
||||||
|
shared.loader=
|
||||||
|
|
||||||
|
# Default list of JAR files that should not be scanned using the JarScanner
|
||||||
|
# functionality. This is typically used to scan JARs for configuration
|
||||||
|
# information. JARs that do not contain such information may be excluded from
|
||||||
|
# the scan to speed up the scanning process. This is the default list. JARs on
|
||||||
|
# this list are excluded from all scans. The list must be a comma separated list
|
||||||
|
# of JAR file names.
|
||||||
|
# The list of JARs to skip may be over-ridden at a Context level for individual
|
||||||
|
# scan types by configuring a JarScanner with a nested JarScanFilter.
|
||||||
|
# The JARs listed below include:
|
||||||
|
# - Tomcat Bootstrap JARs
|
||||||
|
# - Tomcat API JARs
|
||||||
|
# - Catalina JARs
|
||||||
|
# - Jasper JARs
|
||||||
|
# - Tomcat JARs
|
||||||
|
# - Common non-Tomcat JARs
|
||||||
|
# - Test JARs (JUnit, Cobertura and dependencies)
|
||||||
|
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
|
||||||
|
annotations-api.jar,\
|
||||||
|
ant-junit*.jar,\
|
||||||
|
ant-launcher*.jar,\
|
||||||
|
ant*.jar,\
|
||||||
|
asm-*.jar,\
|
||||||
|
aspectj*.jar,\
|
||||||
|
bcel*.jar,\
|
||||||
|
biz.aQute.bnd*.jar,\
|
||||||
|
bootstrap.jar,\
|
||||||
|
catalina-ant.jar,\
|
||||||
|
catalina-ha.jar,\
|
||||||
|
catalina-ssi.jar,\
|
||||||
|
catalina-storeconfig.jar,\
|
||||||
|
catalina-tribes.jar,\
|
||||||
|
catalina.jar,\
|
||||||
|
cglib-*.jar,\
|
||||||
|
cobertura-*.jar,\
|
||||||
|
commons-beanutils*.jar,\
|
||||||
|
commons-codec*.jar,\
|
||||||
|
commons-collections*.jar,\
|
||||||
|
commons-compress*.jar,\
|
||||||
|
commons-daemon.jar,\
|
||||||
|
commons-dbcp*.jar,\
|
||||||
|
commons-digester*.jar,\
|
||||||
|
commons-fileupload*.jar,\
|
||||||
|
commons-httpclient*.jar,\
|
||||||
|
commons-io*.jar,\
|
||||||
|
commons-lang*.jar,\
|
||||||
|
commons-logging*.jar,\
|
||||||
|
commons-math*.jar,\
|
||||||
|
commons-pool*.jar,\
|
||||||
|
derby-*.jar,\
|
||||||
|
dom4j-*.jar,\
|
||||||
|
easymock-*.jar,\
|
||||||
|
ecj-*.jar,\
|
||||||
|
el-api.jar,\
|
||||||
|
geronimo-spec-jaxrpc*.jar,\
|
||||||
|
h2*.jar,\
|
||||||
|
ha-api-*.jar,\
|
||||||
|
hamcrest-*.jar,\
|
||||||
|
hibernate*.jar,\
|
||||||
|
httpclient*.jar,\
|
||||||
|
icu4j-*.jar,\
|
||||||
|
jasper-el.jar,\
|
||||||
|
jasper.jar,\
|
||||||
|
jaspic-api.jar,\
|
||||||
|
jaxb-*.jar,\
|
||||||
|
jaxen-*.jar,\
|
||||||
|
jaxws-rt-*.jar,\
|
||||||
|
jdom-*.jar,\
|
||||||
|
jetty-*.jar,\
|
||||||
|
jmx-tools.jar,\
|
||||||
|
jmx.jar,\
|
||||||
|
jsp-api.jar,\
|
||||||
|
jstl.jar,\
|
||||||
|
jta*.jar,\
|
||||||
|
junit-*.jar,\
|
||||||
|
junit.jar,\
|
||||||
|
log4j*.jar,\
|
||||||
|
mail*.jar,\
|
||||||
|
objenesis-*.jar,\
|
||||||
|
oraclepki.jar,\
|
||||||
|
org.hamcrest.core_*.jar,\
|
||||||
|
org.junit_*.jar,\
|
||||||
|
oro-*.jar,\
|
||||||
|
servlet-api-*.jar,\
|
||||||
|
servlet-api.jar,\
|
||||||
|
slf4j*.jar,\
|
||||||
|
taglibs-standard-spec-*.jar,\
|
||||||
|
tagsoup-*.jar,\
|
||||||
|
tomcat-api.jar,\
|
||||||
|
tomcat-coyote.jar,\
|
||||||
|
tomcat-coyote-ffm.jar,\
|
||||||
|
tomcat-dbcp.jar,\
|
||||||
|
tomcat-i18n-*.jar,\
|
||||||
|
tomcat-jdbc.jar,\
|
||||||
|
tomcat-jni.jar,\
|
||||||
|
tomcat-juli-adapters.jar,\
|
||||||
|
tomcat-juli.jar,\
|
||||||
|
tomcat-util-scan.jar,\
|
||||||
|
tomcat-util.jar,\
|
||||||
|
tomcat-websocket.jar,\
|
||||||
|
tools.jar,\
|
||||||
|
unboundid-ldapsdk-*.jar,\
|
||||||
|
websocket-api.jar,\
|
||||||
|
wsdl4j*.jar,\
|
||||||
|
xercesImpl.jar,\
|
||||||
|
xml-apis.jar,\
|
||||||
|
xmlParserAPIs-*.jar,\
|
||||||
|
xmlParserAPIs.jar,\
|
||||||
|
xom-*.jar
|
||||||
|
|
||||||
|
# Default list of JAR files that should be scanned that overrides the default
|
||||||
|
# jarsToSkip list above. This is typically used to include a specific JAR that
|
||||||
|
# has been excluded by a broad file name pattern in the jarsToSkip list.
|
||||||
|
# The list of JARs to scan may be over-ridden at a Context level for individual
|
||||||
|
# scan types by configuring a JarScanner with a nested JarScanFilter.
|
||||||
|
tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
|
||||||
|
log4j-taglib*.jar,\
|
||||||
|
log4j-web*.jar,\
|
||||||
|
log4javascript*.jar,\
|
||||||
|
slf4j-taglib*.jar
|
||||||
|
|
||||||
|
# String cache configuration.
|
||||||
|
tomcat.util.buf.StringCache.byte.enabled=true
|
||||||
|
#tomcat.util.buf.StringCache.char.enabled=true
|
||||||
|
#tomcat.util.buf.StringCache.trainThreshold=500000
|
||||||
|
#tomcat.util.buf.StringCache.cacheSize=5000
|
||||||
|
|
||||||
|
# Disable use of some privilege blocks Tomcat doesn't need since calls to the
|
||||||
|
# code in question are always already inside a privilege block
|
||||||
|
org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED=false
|
31
apache-tomcat-9.0.109/conf/context.xml
Normal file
31
apache-tomcat-9.0.109/conf/context.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<!-- The contents of this file will be loaded for each web application -->
|
||||||
|
<Context>
|
||||||
|
|
||||||
|
<!-- Default set of monitored resources. If one of these changes, the -->
|
||||||
|
<!-- web application will be reloaded. -->
|
||||||
|
<WatchedResource>WEB-INF/web.xml</WatchedResource>
|
||||||
|
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
|
||||||
|
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
|
||||||
|
|
||||||
|
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
|
||||||
|
<!--
|
||||||
|
<Manager pathname="" />
|
||||||
|
-->
|
||||||
|
</Context>
|
23
apache-tomcat-9.0.109/conf/jaspic-providers.xml
Normal file
23
apache-tomcat-9.0.109/conf/jaspic-providers.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<jaspic-providers xmlns="http://tomcat.apache.org/xml"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://tomcat.apache.org/xml jaspic-providers.xsd"
|
||||||
|
version="1.0">
|
||||||
|
<!-- No JASPIC providers configured by default -->
|
||||||
|
</jaspic-providers>
|
53
apache-tomcat-9.0.109/conf/jaspic-providers.xsd
Normal file
53
apache-tomcat-9.0.109/conf/jaspic-providers.xsd
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||||
|
targetNamespace="http://tomcat.apache.org/xml"
|
||||||
|
xmlns:jaspic="http://tomcat.apache.org/xml"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
elementFormDefault="qualified"
|
||||||
|
attributeFormDefault="unqualified"
|
||||||
|
version="1.0">
|
||||||
|
<xs:element name="jaspic-providers">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="provider" minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="name" use="required" type="jaspic:propertyname" />
|
||||||
|
<xs:attribute name="value" use="required" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="className" type="xs:string" />
|
||||||
|
<xs:attribute name="layer" type="xs:string" />
|
||||||
|
<xs:attribute name="appContext" type="xs:string" />
|
||||||
|
<xs:attribute name="description" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="version" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:simpleType name="propertyname">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:schema>
|
76
apache-tomcat-9.0.109/conf/logging.properties
Normal file
76
apache-tomcat-9.0.109/conf/logging.properties
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
|
||||||
|
|
||||||
|
.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Handler specific properties.
|
||||||
|
# Describes specific configuration info for Handlers.
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
1catalina.org.apache.juli.AsyncFileHandler.level = ALL
|
||||||
|
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
|
||||||
|
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
|
||||||
|
1catalina.org.apache.juli.AsyncFileHandler.maxDays = 90
|
||||||
|
1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8
|
||||||
|
|
||||||
|
2localhost.org.apache.juli.AsyncFileHandler.level = ALL
|
||||||
|
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
|
||||||
|
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
|
||||||
|
2localhost.org.apache.juli.AsyncFileHandler.maxDays = 90
|
||||||
|
2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8
|
||||||
|
|
||||||
|
3manager.org.apache.juli.AsyncFileHandler.level = ALL
|
||||||
|
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
|
||||||
|
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
|
||||||
|
3manager.org.apache.juli.AsyncFileHandler.maxDays = 90
|
||||||
|
3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
|
||||||
|
|
||||||
|
4host-manager.org.apache.juli.AsyncFileHandler.level = ALL
|
||||||
|
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
|
||||||
|
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
|
||||||
|
4host-manager.org.apache.juli.AsyncFileHandler.maxDays = 90
|
||||||
|
4host-manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
|
||||||
|
|
||||||
|
java.util.logging.ConsoleHandler.level = ALL
|
||||||
|
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
|
||||||
|
java.util.logging.ConsoleHandler.encoding = UTF-8
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Facility specific properties.
|
||||||
|
# Provides extra control for each logger.
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
|
||||||
|
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler
|
||||||
|
|
||||||
|
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
|
||||||
|
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler
|
||||||
|
|
||||||
|
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
|
||||||
|
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler
|
||||||
|
|
||||||
|
# For example, set the org.apache.catalina.util.LifecycleBase logger to log
|
||||||
|
# each component that extends LifecycleBase changing state:
|
||||||
|
#org.apache.catalina.util.LifecycleBase.level = FINE
|
||||||
|
|
||||||
|
# To see debug messages for HTTP/2 handling, uncomment the following line:
|
||||||
|
#org.apache.coyote.http2.level = FINE
|
||||||
|
|
||||||
|
# To see debug messages for WebSocket handling, uncomment the following line:
|
||||||
|
#org.apache.tomcat.websocket.level = FINE
|
182
apache-tomcat-9.0.109/conf/server.xml
Normal file
182
apache-tomcat-9.0.109/conf/server.xml
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<!-- Note: A "Server" is not itself a "Container", so you may not
|
||||||
|
define subcomponents such as "Valves" at this level.
|
||||||
|
Documentation at /docs/config/server.html
|
||||||
|
-->
|
||||||
|
<Server port="8005" shutdown="SHUTDOWN">
|
||||||
|
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
|
||||||
|
<!-- Security listener. Documentation at /docs/config/listeners.html
|
||||||
|
<Listener className="org.apache.catalina.security.SecurityListener" />
|
||||||
|
-->
|
||||||
|
<!-- APR connector and OpenSSL support using Tomcat Native -->
|
||||||
|
<Listener className="org.apache.catalina.core.AprLifecycleListener" />
|
||||||
|
<!-- OpenSSL support using FFM API from Java 22 -->
|
||||||
|
<!-- <Listener className="org.apache.catalina.core.OpenSSLLifecycleListener" /> -->
|
||||||
|
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
|
||||||
|
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
|
||||||
|
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
||||||
|
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
|
||||||
|
|
||||||
|
<!-- Global JNDI resources
|
||||||
|
Documentation at /docs/jndi-resources-howto.html
|
||||||
|
-->
|
||||||
|
<GlobalNamingResources>
|
||||||
|
<!-- Editable user database that can also be used by
|
||||||
|
UserDatabaseRealm to authenticate users
|
||||||
|
-->
|
||||||
|
<Resource name="UserDatabase" auth="Container"
|
||||||
|
type="org.apache.catalina.UserDatabase"
|
||||||
|
description="User database that can be updated and saved"
|
||||||
|
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
|
||||||
|
pathname="conf/tomcat-users.xml" />
|
||||||
|
</GlobalNamingResources>
|
||||||
|
|
||||||
|
<!-- A "Service" is a collection of one or more "Connectors" that share
|
||||||
|
a single "Container" Note: A "Service" is not itself a "Container",
|
||||||
|
so you may not define subcomponents such as "Valves" at this level.
|
||||||
|
Documentation at /docs/config/service.html
|
||||||
|
-->
|
||||||
|
<Service name="Catalina">
|
||||||
|
|
||||||
|
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
||||||
|
<!--
|
||||||
|
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
|
||||||
|
maxThreads="150" minSpareThreads="4"/>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- A "Connector" represents an endpoint by which requests are received
|
||||||
|
and responses are returned. Documentation at :
|
||||||
|
Java HTTP Connector: /docs/config/http.html
|
||||||
|
Java AJP Connector: /docs/config/ajp.html
|
||||||
|
APR (HTTP/AJP) Connector: /docs/apr.html
|
||||||
|
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
|
||||||
|
-->
|
||||||
|
<Connector port="8080" protocol="HTTP/1.1"
|
||||||
|
connectionTimeout="20000"
|
||||||
|
redirectPort="8443"
|
||||||
|
maxParameterCount="1000"
|
||||||
|
/>
|
||||||
|
<!-- A "Connector" using the shared thread pool-->
|
||||||
|
<!--
|
||||||
|
<Connector executor="tomcatThreadPool"
|
||||||
|
port="8080" protocol="HTTP/1.1"
|
||||||
|
connectionTimeout="20000"
|
||||||
|
redirectPort="8443"
|
||||||
|
maxParameterCount="1000"
|
||||||
|
/>
|
||||||
|
-->
|
||||||
|
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
|
||||||
|
This connector uses the NIO implementation. The default
|
||||||
|
SSLImplementation will depend on the presence of the APR/native
|
||||||
|
library and the useOpenSSL attribute of the AprLifecycleListener.
|
||||||
|
Either JSSE or OpenSSL style configuration may be used regardless of
|
||||||
|
the SSLImplementation selected. JSSE style configuration is used below.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
||||||
|
maxThreads="150" SSLEnabled="true"
|
||||||
|
maxParameterCount="1000"
|
||||||
|
>
|
||||||
|
<SSLHostConfig>
|
||||||
|
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
|
||||||
|
certificateKeystorePassword="changeit" type="RSA" />
|
||||||
|
</SSLHostConfig>
|
||||||
|
</Connector>
|
||||||
|
-->
|
||||||
|
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
|
||||||
|
This connector uses the APR/native implementation which always uses
|
||||||
|
OpenSSL for TLS.
|
||||||
|
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
|
||||||
|
configuration is used below.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
|
||||||
|
maxThreads="150" SSLEnabled="true"
|
||||||
|
maxParameterCount="1000"
|
||||||
|
>
|
||||||
|
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
|
||||||
|
<SSLHostConfig>
|
||||||
|
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
|
||||||
|
certificateFile="conf/localhost-rsa-cert.pem"
|
||||||
|
certificateChainFile="conf/localhost-rsa-chain.pem"
|
||||||
|
type="RSA" />
|
||||||
|
</SSLHostConfig>
|
||||||
|
</Connector>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Define an AJP 1.3 Connector on port 8009 -->
|
||||||
|
<!--
|
||||||
|
<Connector protocol="AJP/1.3"
|
||||||
|
address="::1"
|
||||||
|
port="8009"
|
||||||
|
redirectPort="8443"
|
||||||
|
maxParameterCount="1000"
|
||||||
|
/>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- An Engine represents the entry point (within Catalina) that processes
|
||||||
|
every request. The Engine implementation for Tomcat stand alone
|
||||||
|
analyzes the HTTP headers included with the request, and passes them
|
||||||
|
on to the appropriate Host (virtual host).
|
||||||
|
Documentation at /docs/config/engine.html -->
|
||||||
|
|
||||||
|
<!-- You should set jvmRoute to support load-balancing via AJP ie :
|
||||||
|
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
|
||||||
|
-->
|
||||||
|
<Engine name="Catalina" defaultHost="localhost">
|
||||||
|
|
||||||
|
<!--For clustering, please take a look at documentation at:
|
||||||
|
/docs/cluster-howto.html (simple how to)
|
||||||
|
/docs/config/cluster.html (reference documentation) -->
|
||||||
|
<!--
|
||||||
|
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
|
||||||
|
via a brute-force attack -->
|
||||||
|
<Realm className="org.apache.catalina.realm.LockOutRealm">
|
||||||
|
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
||||||
|
resources under the key "UserDatabase". Any edits
|
||||||
|
that are performed against this UserDatabase are immediately
|
||||||
|
available for use by the Realm. -->
|
||||||
|
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
||||||
|
resourceName="UserDatabase"/>
|
||||||
|
</Realm>
|
||||||
|
|
||||||
|
<Host name="localhost" appBase="webapps"
|
||||||
|
unpackWARs="true" autoDeploy="true">
|
||||||
|
|
||||||
|
<!-- SingleSignOn valve, share authentication between web applications
|
||||||
|
Documentation at: /docs/config/valve.html -->
|
||||||
|
<!--
|
||||||
|
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Access log processes all example.
|
||||||
|
Documentation at: /docs/config/valve.html
|
||||||
|
Note: The pattern used is equivalent to using pattern="common" -->
|
||||||
|
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
||||||
|
prefix="localhost_access_log" suffix=".txt"
|
||||||
|
pattern="%h %l %u %t "%r" %s %b" />
|
||||||
|
|
||||||
|
</Host>
|
||||||
|
</Engine>
|
||||||
|
</Service>
|
||||||
|
</Server>
|
56
apache-tomcat-9.0.109/conf/tomcat-users.xml
Normal file
56
apache-tomcat-9.0.109/conf/tomcat-users.xml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<tomcat-users xmlns="http://tomcat.apache.org/xml"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
|
||||||
|
version="1.0">
|
||||||
|
<!--
|
||||||
|
By default, no user is included in the "manager-gui" role required
|
||||||
|
to operate the "/manager/html" web application. If you wish to use this app,
|
||||||
|
you must define such a user - the username and password are arbitrary.
|
||||||
|
|
||||||
|
Built-in Tomcat manager roles:
|
||||||
|
- manager-gui - allows access to the HTML GUI and the status pages
|
||||||
|
- manager-script - allows access to the HTTP API and the status pages
|
||||||
|
- manager-jmx - allows access to the JMX proxy and the status pages
|
||||||
|
- manager-status - allows access to the status pages only
|
||||||
|
|
||||||
|
The users below are wrapped in a comment and are therefore ignored. If you
|
||||||
|
wish to configure one or more of these users for use with the manager web
|
||||||
|
application, do not forget to remove the <!.. ..> that surrounds them. You
|
||||||
|
will also need to set the passwords to something appropriate.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<user username="admin" password="<must-be-changed>" roles="manager-gui"/>
|
||||||
|
<user username="robot" password="<must-be-changed>" roles="manager-script"/>
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
The sample user and role entries below are intended for use with the
|
||||||
|
examples web application. They are wrapped in a comment and thus are ignored
|
||||||
|
when reading this file. If you wish to configure these users for use with the
|
||||||
|
examples web application, do not forget to remove the <!.. ..> that surrounds
|
||||||
|
them. You will also need to set the passwords to something appropriate.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<role rolename="tomcat"/>
|
||||||
|
<role rolename="role1"/>
|
||||||
|
<user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
|
||||||
|
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
|
||||||
|
<user username="role1" password="<must-be-changed>" roles="role1"/>
|
||||||
|
-->
|
||||||
|
</tomcat-users>
|
59
apache-tomcat-9.0.109/conf/tomcat-users.xsd
Normal file
59
apache-tomcat-9.0.109/conf/tomcat-users.xsd
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||||
|
targetNamespace="http://tomcat.apache.org/xml"
|
||||||
|
xmlns:users="http://tomcat.apache.org/xml"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
elementFormDefault="qualified"
|
||||||
|
attributeFormDefault="unqualified"
|
||||||
|
version="1.0">
|
||||||
|
<xs:element name="tomcat-users">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:element name="role">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="rolename" use="required" type="users:entityname" />
|
||||||
|
<xs:attribute name="description" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="group">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="groupname" use="required" type="users:entityname" />
|
||||||
|
<xs:attribute name="description" type="xs:string" />
|
||||||
|
<xs:attribute name="roles" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="user">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="username" use="required" type="users:entityname" />
|
||||||
|
<xs:attribute name="fullname" type="xs:string" />
|
||||||
|
<xs:attribute name="password" type="xs:string" />
|
||||||
|
<xs:attribute name="roles" type="xs:string" />
|
||||||
|
<xs:attribute name="groups" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:choice>
|
||||||
|
<xs:attribute name="version" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:simpleType name="entityname">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:minLength value="1"/>
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:schema>
|
4775
apache-tomcat-9.0.109/conf/web.xml
Normal file
4775
apache-tomcat-9.0.109/conf/web.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
apache-tomcat-9.0.109/lib/annotations-api.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/annotations-api.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/catalina-ant.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/catalina-ant.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/catalina-ha.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/catalina-ha.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/catalina-ssi.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/catalina-ssi.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/catalina-storeconfig.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/catalina-storeconfig.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/catalina-tribes.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/catalina-tribes.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/catalina.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/catalina.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/ecj-4.20.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/ecj-4.20.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/el-api.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/el-api.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/jasper-el.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/jasper-el.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/jasper.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/jasper.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/jaspic-api.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/jaspic-api.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/jsp-api.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/jsp-api.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/servlet-api.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/servlet-api.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-api.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-api.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-coyote-ffm.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-coyote-ffm.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-coyote.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-coyote.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-dbcp.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-dbcp.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-cs.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-cs.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-de.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-de.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-es.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-es.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-fr.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-fr.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-ja.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-ja.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-ko.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-ko.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-pt-BR.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-pt-BR.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-ru.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-ru.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-zh-CN.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-i18n-zh-CN.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-jdbc.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-jdbc.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-jni.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-jni.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-util-scan.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-util-scan.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-util.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-util.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/tomcat-websocket.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/tomcat-websocket.jar
Normal file
Binary file not shown.
BIN
apache-tomcat-9.0.109/lib/websocket-api.jar
Normal file
BIN
apache-tomcat-9.0.109/lib/websocket-api.jar
Normal file
Binary file not shown.
0
apache-tomcat-9.0.109/temp/safeToDelete.tmp
Normal file
0
apache-tomcat-9.0.109/temp/safeToDelete.tmp
Normal file
5
apache-tomcat-9.0.109/webapps/ROOT/META-INF/MANIFEST.MF
Normal file
5
apache-tomcat-9.0.109/webapps/ROOT/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Created-By: IntelliJ IDEA
|
||||||
|
Built-By: 15731
|
||||||
|
Build-Jdk: Oracle OpenJDK 1.8.0_202
|
||||||
|
|
@ -0,0 +1,118 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
|
||||||
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||||
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
|
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/context
|
||||||
|
http://www.springframework.org/schema/context/spring-context-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/mvc
|
||||||
|
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/aop
|
||||||
|
http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/cache
|
||||||
|
http://www.springframework.org/schema/cache/spring-cache-4.3.xsd">
|
||||||
|
|
||||||
|
<aop:aspectj-autoproxy/>
|
||||||
|
<context:annotation-config />
|
||||||
|
|
||||||
|
<context:component-scan base-package="com.mcg">
|
||||||
|
<context:exclude-filter type="annotation"
|
||||||
|
expression="org.springframework.stereotype.Controller" />
|
||||||
|
</context:component-scan>
|
||||||
|
|
||||||
|
<context:component-scan base-package="com.mcg.controller"/>
|
||||||
|
<bean class="org.springframework.validation.beanvalidation.MethodValidationPostProcessor">
|
||||||
|
<property name="validator" ref="validator"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
|
||||||
|
<property name="providerClass" value="org.hibernate.validator.HibernateValidator"/>
|
||||||
|
<property name="validationMessageSource" ref="messageSource"/>
|
||||||
|
</bean>
|
||||||
|
<mvc:annotation-driven validator="validator">
|
||||||
|
<mvc:message-converters register-defaults="true">
|
||||||
|
<ref bean="fastJsonHttpMessageConverter"/>
|
||||||
|
</mvc:message-converters>
|
||||||
|
</mvc:annotation-driven>
|
||||||
|
|
||||||
|
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
|
||||||
|
<property name="basenames">
|
||||||
|
<list>
|
||||||
|
<value>classpath:messages</value>
|
||||||
|
<value>classpath:org/hibernate/validator/ValidationMessages</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
<property name="useCodeAsDefaultMessage" value="false"/>
|
||||||
|
<property name="defaultEncoding" value="UTF-8"/>
|
||||||
|
<property name="cacheSeconds" value="60"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
|
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
|
||||||
|
<property name="cookieName" value="language"/>
|
||||||
|
<property name="cookieMaxAge" value="3600"/>
|
||||||
|
<property name="defaultLocale" value="zh_CN"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="fastJsonHttpMessageConverter" class="com.mcg.common.FastJsonHttpMessageConverter">
|
||||||
|
<property name="supportedMediaTypes">
|
||||||
|
<list>
|
||||||
|
<value>application/json</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
<property name="dateFormat" value="yyyy-MM-dd HH:mm:ss"/>
|
||||||
|
<property name="features">
|
||||||
|
<list>
|
||||||
|
<value>DisableCircularReferenceDetect</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
|
||||||
|
<property name="messageConverters">
|
||||||
|
<list>
|
||||||
|
<ref bean="fastJsonHttpMessageConverter" />
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||||
|
<property name="prefix" value="/template/"/>
|
||||||
|
<property name="suffix" value=".jsp"/>
|
||||||
|
</bean>
|
||||||
|
<mvc:default-servlet-handler />
|
||||||
|
<mvc:resources mapping="/js/**" location="/library/js/"/>
|
||||||
|
<mvc:resources mapping="/css/**" location="/library/css/"/>
|
||||||
|
|
||||||
|
<mvc:interceptors>
|
||||||
|
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
|
||||||
|
<property name="paramName" value="language"/>
|
||||||
|
</bean>
|
||||||
|
<mvc:interceptor>
|
||||||
|
<mvc:mapping path="/**/**"/>
|
||||||
|
<mvc:exclude-mapping path="/login"/>
|
||||||
|
<mvc:exclude-mapping path="/*/*/*.js"/>
|
||||||
|
<mvc:exclude-mapping path="/*/*/*/*/*.js"/>
|
||||||
|
<mvc:exclude-mapping path="/*/*/*/*/*.css"/>
|
||||||
|
<bean class="com.mcg.interceptor.LoginHandlerInterceptor" />
|
||||||
|
</mvc:interceptor>
|
||||||
|
</mvc:interceptors>
|
||||||
|
|
||||||
|
<bean class="com.mcg.common.SpringContextHelper"/>
|
||||||
|
|
||||||
|
<bean id="cacheManager"
|
||||||
|
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
|
||||||
|
<property name="configLocation" value="classpath:ehcache.xml" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" p:defaultEncoding="utf-8">
|
||||||
|
<property name="maxUploadSize" value="5242880" />
|
||||||
|
<property name="maxInMemorySize" value="1024" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="mcgTask" class="com.mcg.plugin.task.McgTask" init-method="init"></bean>
|
||||||
|
</beans>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
|
||||||
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||||
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
|
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/context
|
||||||
|
http://www.springframework.org/schema/context/spring-context-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/mvc
|
||||||
|
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/aop
|
||||||
|
http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
|
||||||
|
http://www.springframework.org/schema/cache
|
||||||
|
http://www.springframework.org/schema/cache/spring-cache-4.3.xsd">
|
||||||
|
|
||||||
|
</beans>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user