init
This commit is contained in:
46
.gitignore
vendored
Normal file
46
.gitignore
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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.
|
||||
# -----------------------------------------------------------------------------
|
||||
logs
|
||||
nbproject
|
||||
output
|
||||
# Next line commented out, because test/webapp-virtual-library and
|
||||
# test/webapp-virtual-webapp use it:
|
||||
# target
|
||||
work
|
||||
build.properties
|
||||
mvn.properties
|
||||
.ant-targets-build.xml
|
||||
.checkstyle
|
||||
.classpath
|
||||
.fbprefs
|
||||
.project
|
||||
.settings
|
||||
.idea
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
*.asc
|
||||
*.jj
|
||||
*.tmp
|
||||
maven-ant-tasks-*.jar
|
||||
thumbs.db
|
||||
Thumbs.db
|
||||
bin/setenv.*
|
||||
java/org/apache/catalina/startup/catalina.properties
|
||||
modules/jdbc-pool/bin
|
||||
modules/jdbc-pool/includes
|
||||
webapps/docs/jdbc-pool.xml
|
||||
82
.travis.yml
Normal file
82
.travis.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
# 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.
|
||||
|
||||
dist: bionic
|
||||
language: java
|
||||
jdk: oraclejdk8
|
||||
arch: arm64
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- ant
|
||||
- build-essential
|
||||
- automake
|
||||
- autoconf
|
||||
- tar
|
||||
- libssl-dev
|
||||
- subversion
|
||||
- git
|
||||
- libtool-bin
|
||||
|
||||
install:
|
||||
- ARCH=`uname -p`
|
||||
- echo $ARCH
|
||||
- JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz"
|
||||
- JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz"
|
||||
- if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; else JDK_URL=$JDK_X64; fi
|
||||
- wget -q $JDK_URL && tar xzf OpenJDK*.tar.gz
|
||||
- mv jdk8* jdk
|
||||
- export JAVA_HOME=`pwd`/jdk
|
||||
- wget -q http://mirrors.netix.net/apache/ant/binaries/apache-ant-1.10.7-bin.tar.gz && tar xzf apache-ant-*-bin.tar.gz
|
||||
- export ANT_HOME=`pwd`/apache-ant-1.10.7
|
||||
- export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
|
||||
- java -version
|
||||
- ant -version
|
||||
- rm -rf $HOME/tmp
|
||||
- export CURR_PWD=`pwd`
|
||||
- svn co -q https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x/ $HOME/tmp/apr
|
||||
- cd $HOME/tmp/apr
|
||||
- ./buildconf
|
||||
- ./configure --prefix=$HOME/tmp/apr-build
|
||||
- make
|
||||
- make install
|
||||
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/tmp/apr-build/lib"
|
||||
- git clone -q https://github.com/apache/tomcat-native.git $HOME/tmp/tomcat-native
|
||||
- cd $HOME/tmp/tomcat-native/native
|
||||
- sh buildconf --with-apr=$HOME/tmp/apr
|
||||
- ./configure --with-apr=$HOME/tmp/apr --with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$HOME/tmp/tomcat-native-build
|
||||
- make
|
||||
- make install
|
||||
- cd $CURR_PWD
|
||||
- yes | cp build.properties.default build.properties
|
||||
- echo "test.threads=16" >> build.properties
|
||||
- echo "test.relaxTiming=true" >> build.properties
|
||||
- echo "test.excludePerformance=true" >> build.properties
|
||||
- echo "test.openssl.path=/dev/null/openssl" >> build.properties
|
||||
- echo "test.apr.loc=$HOME/tmp/tomcat-native-build/lib" >> build.properties
|
||||
|
||||
|
||||
script:
|
||||
- ant -q clean
|
||||
- travis_wait 60 "./.travis/antTest.sh"
|
||||
|
||||
after_failure:
|
||||
- tail -n 5000 ant-test.log
|
||||
- ls -laR $HOME/tomcat-build-libs
|
||||
|
||||
notifications:
|
||||
email:
|
||||
- dev@tomcat.apache.org
|
||||
23
.travis/antTest.sh
Normal file
23
.travis/antTest.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
# A helper script for TravisCI builds that saves the std
|
||||
# out and err streams in a log file. This is needed
|
||||
# because otherwise TravisCI complains that there is too
|
||||
# much logging on stdout
|
||||
|
||||
ant -q test 2>&1 > ant-test.log
|
||||
564
BUILDING.txt
Normal file
564
BUILDING.txt
Normal file
File diff suppressed because it is too large
Load Diff
136
CONTRIBUTING.md
Normal file
136
CONTRIBUTING.md
Normal file
@@ -0,0 +1,136 @@
|
||||
# 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.
|
||||
|
||||
### 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 (7, 8.5, and 9).
|
||||
|
||||
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 9](https://tomcat.apache.org/download-90.cgi)
|
||||
- [Tomcat 8](https://tomcat.apache.org/download-80.cgi)
|
||||
- [Tomcat 7](https://tomcat.apache.org/download-70.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 (other
|
||||
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:
|
||||
|
||||
## 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:
|
||||
72
MERGE.txt
Normal file
72
MERGE.txt
Normal file
@@ -0,0 +1,72 @@
|
||||
================================================================================
|
||||
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 re-uses code from a number of other Apache projects. There are
|
||||
several reasons why depending on the binary releases of those projects is not
|
||||
ideal. These include:
|
||||
- potential conflicts if a web application ships with the same JAR
|
||||
- a large JAR where Tomcat only depends on a small fraction
|
||||
|
||||
|
||||
GIT
|
||||
===
|
||||
|
||||
Updates from Git are applied manually via patch files. Patch files are generated
|
||||
using:
|
||||
git diff <last SHA1>:<sub-tree> HEAD:<sub-tree> > temp.patch
|
||||
The most recently merged SHA1 for the component below should be updated after
|
||||
the patch file has been applied and committed
|
||||
|
||||
BCEL
|
||||
----
|
||||
Sub-tree:
|
||||
src/main/java/org/apache/bcel
|
||||
The SHA1 ID for the most recent commit to be merged to Tomcat is:
|
||||
ff6941e4491c68f6eaf270ff03c1bc1e554c7b42 (2019-12-06)
|
||||
|
||||
Codec
|
||||
-----
|
||||
Sub-tree:
|
||||
src/main/java/org/apache/commons/codec
|
||||
The SHA1 ID for the most recent commit to be merged to Tomcat is:
|
||||
9637dd44fa0e2d5a6ddb45791e3cd78298842d95 (2019-12-06)
|
||||
Note: Only classes required for Base64 encoding/decoding. The rest are removed.
|
||||
|
||||
FileUpload
|
||||
----------
|
||||
Sub-tree:
|
||||
src/main/java/org/apache/commons/fileupload2
|
||||
The SHA1 ID for the most recent commit to be merged to Tomcat is:
|
||||
2317552993fd5180a84083d599b8cbdb05a07bab (2019-12-06)
|
||||
|
||||
Note: Tomcat's copy of fileupload also includes classes copied manually from
|
||||
Commons IO.
|
||||
|
||||
DBCP
|
||||
----
|
||||
Pool2
|
||||
Sub-tree
|
||||
src/main/java/org/apache/commons/pool2
|
||||
The SHA1 ID for the most recent commit to be merged to Tomcat is:
|
||||
6092f924b36061353ff92b18c88400ab3bc05327 (2019-12-06)
|
||||
|
||||
DBCP2
|
||||
Sub-tree
|
||||
src/main/java/org/apache/commons/dbcp2
|
||||
src/main/resources/org/apache/commons/dbcp2
|
||||
The SHA1 ID for the most recent commit to be merged to Tomcat is:
|
||||
a363906bf7a039f79c07fa3c68b082a69ae035d7 (2019-12-06)
|
||||
51
NOTICE
Normal file
51
NOTICE
Normal file
@@ -0,0 +1,51 @@
|
||||
Apache Tomcat
|
||||
Copyright 1999-2020 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).
|
||||
|
||||
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/.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
may be obtained from:
|
||||
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html
|
||||
79
README.md
Normal file
79
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://wiki.apache.org/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 9](https://tomcat.apache.org/download-90.cgi)
|
||||
- [Tomcat 8](https://tomcat.apache.org/download-80.cgi)
|
||||
- [Tomcat 7](https://tomcat.apache.org/download-70.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 9](https://tomcat.apache.org/tomcat-9.0-doc/)
|
||||
- [Tomcat 8](https://tomcat.apache.org/tomcat-8.5-doc/)
|
||||
- [Tomcat 7](https://tomcat.apache.org/tomcat-7.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.
|
||||
178
RELEASE-NOTES
Normal file
178
RELEASE-NOTES
Normal file
@@ -0,0 +1,178 @@
|
||||
================================================================================
|
||||
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 @VERSION@
|
||||
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 @VERSION_MAJOR_MINOR@ is designed to run on Java @MIN_JAVA_VERSION@ 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 @VERSION_MAJOR@.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 @VERSION_MAJOR@ matures, the above list will be added to. The list is not
|
||||
considered complete at this time.
|
||||
|
||||
Note: A large number of deprecated methods, fields and configuration options
|
||||
were removed in the transition from 8.0.x to 8.5.x. If any of those
|
||||
removals triggers significant problems for the user community that the
|
||||
deletion may be reverted in a later point release.
|
||||
|
||||
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 @VERSION_MAJOR_MINOR@ 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-storeconfig.jar (Generation of XML configuration from current state)
|
||||
* catalina-tribes.jar (Group communication)
|
||||
* ecj-@JDT_VERSION@.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 3.1 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 disable
|
||||
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/
|
||||
476
RUNNING.txt
Normal file
476
RUNNING.txt
Normal file
@@ -0,0 +1,476 @@
|
||||
================================================================================
|
||||
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 @VERSION_MAJOR_MINOR@ Servlet/JSP Container
|
||||
===================================================
|
||||
|
||||
Apache Tomcat @VERSION_MAJOR_MINOR@ requires a Java Standard Edition Runtime
|
||||
Environment (JRE) version 7 or later.
|
||||
|
||||
=============================
|
||||
Running With JRE 7 Or Later
|
||||
=============================
|
||||
|
||||
(1) Download and Install a Java SE Runtime Environment (JRE)
|
||||
|
||||
(1.1) Download a Java SE Runtime Environment (JRE),
|
||||
release version 7 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 enable 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\jre@MIN_JAVA_VERSION@"
|
||||
exit /b 0
|
||||
|
||||
On *nix, $CATALINA_BASE/bin/setenv.sh:
|
||||
|
||||
JRE_HOME=/usr/java/latest
|
||||
CATALINA_PID="$CATALINA_BASE/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 (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 using
|
||||
the following trick:
|
||||
|
||||
* 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" />
|
||||
</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-@VERSION_MAJOR_MINOR@-doc/apr.html
|
||||
|
||||
* Documentation for the HTTP and AJP protocol connectors in the Tomcat
|
||||
Configuration Reference
|
||||
|
||||
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/config/http.html
|
||||
|
||||
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-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 disable Apache Tomcat Native library:
|
||||
|
||||
- To disable 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-@VERSION_MAJOR_MINOR@-doc/setup.html
|
||||
|
||||
* Windows Service How-To
|
||||
|
||||
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/windows-service-howto.html
|
||||
|
||||
The binary files of Apache Commons Daemon in Apache Tomcat distributions
|
||||
for Windows are named:
|
||||
|
||||
- "tomcat@VERSION_MAJOR@.exe"
|
||||
- "tomcat@VERSION_MAJOR@w.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 @VERSION_MAJOR_MINOR@
|
||||
in parallel, you have to further rename those files, using the same naming
|
||||
scheme.
|
||||
39
bin/catalina-tasks.xml
Normal file
39
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>
|
||||
374
bin/catalina.bat
Normal file
374
bin/catalina.bat
Normal file
@@ -0,0 +1,374 @@
|
||||
@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 "tomcat@VERSION_MAJOR@w.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 LOGGING_CONFIG (Optional) Override Tomcat's logging config file
|
||||
rem Example (all one line)
|
||||
rem set LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
|
||||
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"
|
||||
|
||||
if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
|
||||
set LOGGING_CONFIG=-Dnop
|
||||
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
|
||||
set 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
|
||||
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.io=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%"
|
||||
|
||||
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% -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% %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% %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% %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% %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
|
||||
655
bin/catalina.sh
Normal file
655
bin/catalina.sh
Normal file
File diff suppressed because it is too large
Load Diff
58
bin/ciphers.bat
Normal file
58
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
bin/ciphers.sh
Normal file
60
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 "$@"
|
||||
58
bin/configtest.bat
Normal file
58
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
bin/configtest.sh
Normal file
60
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 "$@"
|
||||
277
bin/daemon.sh
Normal file
277
bin/daemon.sh
Normal file
@@ -0,0 +1,277 @@
|
||||
#!/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
|
||||
# JAVA_HOME=/opt/jdk-1.6.0.22
|
||||
# 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
|
||||
# Set juli LogManager config file if it is present and an override has not been issued
|
||||
if [ -z "$LOGGING_CONFIG" ]; then
|
||||
if [ -r "$CATALINA_BASE/conf/logging.properties" ]; then
|
||||
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
|
||||
else
|
||||
# Bugzilla 45585
|
||||
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
|
||||
|
||||
# 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 \
|
||||
-nodetach \
|
||||
-outfile "\"&1\"" \
|
||||
-errfile "\"&2\"" \
|
||||
-classpath "\"$CLASSPATH\"" \
|
||||
"\"$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 \
|
||||
-outfile "\"$CATALINA_OUT\"" \
|
||||
-errfile "\"&1\"" \
|
||||
-classpath "\"$CLASSPATH\"" \
|
||||
"\"$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
bin/digest.bat
Normal file
58
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
bin/digest.sh
Normal file
60
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 "$@"
|
||||
239
bin/service.bat
Normal file
239
bin/service.bat
Normal file
@@ -0,0 +1,239 @@
|
||||
@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 NT Service Install/Uninstall script
|
||||
rem
|
||||
rem Usage: service.bat install/remove [service_name [--rename]] [--user username]
|
||||
rem
|
||||
rem Options
|
||||
rem install Install the service using default settings.
|
||||
rem remove Remove the service from the system.
|
||||
rem
|
||||
rem service_name (optional) The name to use for the service. If not specified,
|
||||
rem Tomcat@VERSION_MAJOR@ is used as the service name.
|
||||
rem
|
||||
rem --rename (optional) Rename tomcat@VERSION_MAJOR@.exe and tomcat@VERSION_MAJOR@w.exe to match
|
||||
rem the non-default service name.
|
||||
rem
|
||||
rem username (optional) The name of the OS user to use to install/remove
|
||||
rem the service (not the name of the OS user the
|
||||
rem service will run as). If not specified, the current
|
||||
rem user is used.
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
set "SELF=%~dp0%service.bat"
|
||||
|
||||
set DEFAULT_SERVICE_NAME=Tomcat@VERSION_MAJOR@
|
||||
set SERVICE_NAME=%DEFAULT_SERVICE_NAME%
|
||||
|
||||
set "CURRENT_DIR=%cd%"
|
||||
|
||||
rem Parse the arguments
|
||||
if "x%1x" == "xx" goto displayUsage
|
||||
set SERVICE_CMD=%1
|
||||
shift
|
||||
if "x%1x" == "xx" goto checkEnv
|
||||
:checkUser
|
||||
if "x%1x" == "x/userx" goto runAsUser
|
||||
if "x%1x" == "x--userx" goto runAsUser
|
||||
set SERVICE_NAME=%1
|
||||
shift
|
||||
if "x%1x" == "xx" goto checkEnv
|
||||
if "x%1x" == "x--renamex" (
|
||||
set RENAME=%1
|
||||
shift
|
||||
)
|
||||
if "x%1x" == "xx" goto checkEnv
|
||||
goto checkUser
|
||||
:runAsUser
|
||||
shift
|
||||
if "x%1x" == "xx" goto displayUsage
|
||||
set SERVICE_USER=%1
|
||||
shift
|
||||
runas /env /savecred /user:%SERVICE_USER% "%COMSPEC% /K \"%SELF%\" %SERVICE_CMD% %SERVICE_NAME%"
|
||||
goto end
|
||||
|
||||
rem Check the environment
|
||||
:checkEnv
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set "CATALINA_HOME=%cd%"
|
||||
if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" goto okHome
|
||||
if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" goto okHome
|
||||
rem CD to the upper dir
|
||||
cd ..
|
||||
set "CATALINA_HOME=%cd%"
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
|
||||
set "EXECUTABLE=%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe"
|
||||
goto okHome
|
||||
)
|
||||
if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
|
||||
set "EXECUTABLE=%CATALINA_HOME%\bin\%SERVICE_NAME%.exe"
|
||||
goto okHome
|
||||
)
|
||||
if "%DEFAULT_SERVICE_NAME%"== "%SERVICE_NAME%" (
|
||||
echo The file %DEFAULT_SERVICE_NAME%.exe was not found...
|
||||
) else (
|
||||
echo Neither the %DEFAULT_SERVICE_NAME%.exe file nor the %SERVICE_NAME%.exe file was found...
|
||||
)
|
||||
echo Either the CATALINA_HOME environment variable is not defined correctly or
|
||||
echo the incorrect service name has been used.
|
||||
echo Both the CATALINA_HOME environment variable and the correct service name
|
||||
echo are required to run this program.
|
||||
goto end
|
||||
:okHome
|
||||
cd "%CURRENT_DIR%"
|
||||
|
||||
rem Make sure prerequisite environment variables are set
|
||||
if not "%JAVA_HOME%" == "" goto gotJdkHome
|
||||
if not "%JRE_HOME%" == "" goto gotJreHome
|
||||
echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
|
||||
echo Service will try to guess them from the registry.
|
||||
goto okJavaHome
|
||||
:gotJreHome
|
||||
if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome
|
||||
goto okJavaHome
|
||||
:gotJdkHome
|
||||
if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
|
||||
rem Java 9 has a different directory structure
|
||||
if exist "%JAVA_HOME%\jre\bin\java.exe" goto preJava9Layout
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if not "%JRE_HOME%" == "" goto okJavaHome
|
||||
set "JRE_HOME=%JAVA_HOME%"
|
||||
goto okJavaHome
|
||||
:preJava9Layout
|
||||
if not "%JRE_HOME%" == "" goto okJavaHome
|
||||
set "JRE_HOME=%JAVA_HOME%\jre"
|
||||
goto okJavaHome
|
||||
:noJavaHome
|
||||
echo The JAVA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
echo NB: JAVA_HOME should point to a JDK not a JRE
|
||||
goto end
|
||||
:okJavaHome
|
||||
if not "%CATALINA_BASE%" == "" goto gotBase
|
||||
set "CATALINA_BASE=%CATALINA_HOME%"
|
||||
:gotBase
|
||||
|
||||
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 Process the requested command
|
||||
if /i %SERVICE_CMD% == install goto doInstall
|
||||
if /i %SERVICE_CMD% == remove goto doRemove
|
||||
if /i %SERVICE_CMD% == uninstall goto doRemove
|
||||
echo Unknown parameter "%SERVICE_CMD%"
|
||||
:displayUsage
|
||||
echo.
|
||||
echo Usage: service.bat install/remove [service_name [--rename]] [--user username]
|
||||
goto end
|
||||
|
||||
:doRemove
|
||||
rem Remove the service
|
||||
echo Removing the service '%SERVICE_NAME%' ...
|
||||
echo Using CATALINA_BASE: "%CATALINA_BASE%"
|
||||
|
||||
"%EXECUTABLE%" //DS//%SERVICE_NAME% ^
|
||||
--LogPath "%CATALINA_BASE%\logs"
|
||||
if not errorlevel 1 goto removed
|
||||
echo Failed removing '%SERVICE_NAME%' service
|
||||
goto end
|
||||
:removed
|
||||
echo The service '%SERVICE_NAME%' has been removed
|
||||
if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
|
||||
rename "%SERVICE_NAME%.exe" "%DEFAULT_SERVICE_NAME%.exe"
|
||||
rename "%SERVICE_NAME%w.exe" "%DEFAULT_SERVICE_NAME%w.exe"
|
||||
)
|
||||
goto end
|
||||
|
||||
:doInstall
|
||||
rem Install the service
|
||||
echo Installing the service '%SERVICE_NAME%' ...
|
||||
echo Using CATALINA_HOME: "%CATALINA_HOME%"
|
||||
echo Using CATALINA_BASE: "%CATALINA_BASE%"
|
||||
echo Using JAVA_HOME: "%JAVA_HOME%"
|
||||
echo Using JRE_HOME: "%JRE_HOME%"
|
||||
|
||||
rem Try to use the server jvm
|
||||
set "JVM=%JRE_HOME%\bin\server\jvm.dll"
|
||||
if exist "%JVM%" goto foundJvm
|
||||
rem Try to use the client jvm
|
||||
set "JVM=%JRE_HOME%\bin\client\jvm.dll"
|
||||
if exist "%JVM%" goto foundJvm
|
||||
echo Warning: Neither 'server' nor 'client' jvm.dll was found at JRE_HOME.
|
||||
set JVM=auto
|
||||
:foundJvm
|
||||
echo Using JVM: "%JVM%"
|
||||
|
||||
set "CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar"
|
||||
if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
|
||||
|
||||
if "%SERVICE_STARTUP_MODE%" == "" set SERVICE_STARTUP_MODE=manual
|
||||
if "%JvmMs%" == "" set JvmMs=128
|
||||
if "%JvmMx%" == "" set JvmMx=256
|
||||
|
||||
if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
|
||||
if "x%RENAME%x" == "x--renamex" (
|
||||
rename "%DEFAULT_SERVICE_NAME%.exe" "%SERVICE_NAME%.exe"
|
||||
rename "%DEFAULT_SERVICE_NAME%w.exe" "%SERVICE_NAME%w.exe"
|
||||
set "EXECUTABLE=%CATALINA_HOME%\bin\%SERVICE_NAME%.exe"
|
||||
)
|
||||
)
|
||||
|
||||
"%EXECUTABLE%" //IS//%SERVICE_NAME% ^
|
||||
--Description "Apache Tomcat @VERSION@ Server - https://tomcat.apache.org/" ^
|
||||
--DisplayName "Apache Tomcat @VERSION_MAJOR_MINOR@ %SERVICE_NAME%" ^
|
||||
--Install "%EXECUTABLE%" ^
|
||||
--LogPath "%CATALINA_BASE%\logs" ^
|
||||
--StdOutput auto ^
|
||||
--StdError auto ^
|
||||
--Classpath "%CLASSPATH%" ^
|
||||
--Jvm "%JVM%" ^
|
||||
--StartMode jvm ^
|
||||
--StopMode jvm ^
|
||||
--StartPath "%CATALINA_HOME%" ^
|
||||
--StopPath "%CATALINA_HOME%" ^
|
||||
--StartClass org.apache.catalina.startup.Bootstrap ^
|
||||
--StopClass org.apache.catalina.startup.Bootstrap ^
|
||||
--StartParams start ^
|
||||
--StopParams stop ^
|
||||
--JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-D%ENDORSED_PROP%=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;%JvmArgs%" ^
|
||||
--JvmOptions9 "--add-opens=java.base/java.lang=ALL-UNNAMED#--add-opens=java.base/java.io=ALL-UNNAMED#--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED" ^
|
||||
--Startup "%SERVICE_STARTUP_MODE%" ^
|
||||
--JvmMs "%JvmMs%" ^
|
||||
--JvmMx "%JvmMx%"
|
||||
if not errorlevel 1 goto installed
|
||||
echo Failed installing '%SERVICE_NAME%' service
|
||||
goto end
|
||||
:installed
|
||||
echo The service '%SERVICE_NAME%' has been installed.
|
||||
|
||||
:end
|
||||
94
bin/setclasspath.bat
Normal file
94
bin/setclasspath.bat
Normal file
@@ -0,0 +1,94 @@
|
||||
@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 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, use JAVA_HOME as JRE_HOME
|
||||
set "JRE_HOME=%JAVA_HOME%"
|
||||
|
||||
: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 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
|
||||
98
bin/setclasspath.sh
Normal file
98
bin/setclasspath.sh
Normal file
@@ -0,0 +1,98 @@
|
||||
#!/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 [ -z "$JRE_HOME" ]; then
|
||||
JRE_HOME="$JAVA_HOME"
|
||||
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 "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 "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
|
||||
|
||||
# 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
bin/shutdown.bat
Normal file
58
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
bin/shutdown.sh
Normal file
60
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
bin/startup.bat
Normal file
58
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
bin/startup.sh
Normal file
60
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 "$@"
|
||||
110
bin/tool-wrapper.bat
Normal file
110
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
bin/tool-wrapper.sh
Normal file
153
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
bin/version.bat
Normal file
58
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
bin/version.sh
Normal file
60
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 "$@"
|
||||
293
build.properties.default
Normal file
293
build.properties.default
Normal file
@@ -0,0 +1,293 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# 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.
|
||||
# -----------------------------------------------------------------------------
|
||||
# build.properties.sample
|
||||
#
|
||||
# This is an example "build.properties" file, used to customize building
|
||||
# Tomcat for your local environment. It defines the location of all external
|
||||
# modules that Tomcat depends on. Copy this file to "build.properties"
|
||||
# in the top-level source directory, and customize it as needed.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# ----- Version Control Flags -----
|
||||
version.major=8
|
||||
version.minor=5
|
||||
version.build=51
|
||||
version.patch=0
|
||||
version.suffix=
|
||||
|
||||
# ----- Source control flags -----
|
||||
git.branch=8.5.x
|
||||
|
||||
# ----- Build control flags -----
|
||||
# Note enabling validation uses Checkstyle which is LGPL licensed
|
||||
execute.validate=false
|
||||
execute.test.nio=true
|
||||
execute.test.nio2=true
|
||||
# Still requires APR/native library to be present
|
||||
execute.test.apr=true
|
||||
# Stop testing if a failure occurs
|
||||
test.haltonfailure=false
|
||||
# Activate AccessLog during testing
|
||||
test.accesslog=false
|
||||
# Display the tests output on the console
|
||||
test.verbose=true
|
||||
|
||||
# Number of parallel threads to use for testing. The recommended value is one
|
||||
# thread per core.
|
||||
# Note: Cobertura code coverage currently requires this to be set to 1. Setting
|
||||
# a value above one will disable code coverage if enabled.
|
||||
test.threads=1
|
||||
|
||||
# Note the Cobertura code coverage tool is GPLv2 licensed
|
||||
test.cobertura=false
|
||||
|
||||
# Note the FindBugs is LGPL licensed
|
||||
execute.findbugs=false
|
||||
|
||||
# Some platforms (e.g. OSX El Capitan) require IPv4 to be the default for the
|
||||
# multicast tests to work
|
||||
java.net.preferIPv4Stack=false
|
||||
|
||||
# Specify the default (true) else the empty string will be used which
|
||||
# effectively changes the setting to false
|
||||
org.apache.tomcat.util.net.NioSelectorShared=true
|
||||
|
||||
# Location of GPG executable (used only for releases)
|
||||
gpg.exec=/path/to/gpg
|
||||
|
||||
# Code signing of Windows installer
|
||||
do.codesigning=false
|
||||
codesigning.user=request-via-pmc
|
||||
codesigning.pwd=request-via-pmc
|
||||
codesigning.partnercode=request-via-pmc
|
||||
codesigning.keyStore=request-via-pmc
|
||||
codesigning.keyStorePassword=request-via-pmc
|
||||
codesigning.service=Microsoft Windows Signing
|
||||
|
||||
# ----- Settings to use when downloading files -----
|
||||
trydownload.httpusecaches=true
|
||||
|
||||
# ----- Default Base Path for Dependent Packages -----
|
||||
# Please note this path must be absolute, not relative,
|
||||
# as it is referenced with different working directory
|
||||
# contexts by the various build scripts.
|
||||
base.path=${user.home}/tomcat-build-libs
|
||||
|
||||
compile.debug=true
|
||||
|
||||
# Do not pass -deprecation (-Xlint:deprecation) flag to javac
|
||||
compile.deprecation=false
|
||||
|
||||
base-apache.loc.1=http://www.apache.org/dyn/closer.lua?action=download&filename=
|
||||
base-apache.loc.2=https://archive.apache.org/dist
|
||||
base-commons.loc.1=${base-apache.loc.1}/commons
|
||||
base-commons.loc.2=${base-apache.loc.2}/commons
|
||||
base-tomcat.loc.1=${base-apache.loc.1}/tomcat
|
||||
base-tomcat.loc.2=${base-apache.loc.2}/tomcat
|
||||
|
||||
base-sf.loc=https://downloads.sourceforge.net
|
||||
# repo.maven.apache.org is the same as repo2.maven.org
|
||||
base-maven.loc=https://repo.maven.apache.org/maven2
|
||||
|
||||
# Mirror, was used when there were problems with the main SF downloads site
|
||||
# base-sf.loc=https://sunet.dl.sourceforge.net
|
||||
|
||||
# checkstyle-backport-jre6
|
||||
base-checkstyle.loc=https://rnveach.github.io/checkstyle-backport-jre6/maven2
|
||||
|
||||
# ----- Webservices - JAX RPC -----
|
||||
jaxrpc-lib.version=1.1-rc4
|
||||
jaxrpc-lib.checksum.enabled=true
|
||||
jaxrpc-lib.checksum.algorithm=MD5|SHA-1
|
||||
jaxrpc-lib.checksum.value=4bebba22a4cdb9f68e16c45129770333|fe9371d33dc3e1646d4d13bde19614283eb998b1
|
||||
jaxrpc-lib.home=${base.path}/jaxrpc-${jaxrpc-lib.version}
|
||||
jaxrpc-lib.jar=${jaxrpc-lib.home}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar
|
||||
jaxrpc-lib.loc=${base-maven.loc}/geronimo-spec/geronimo-spec-jaxrpc/${jaxrpc-lib.version}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar
|
||||
|
||||
# ----- Webservices - WSDL4J -----
|
||||
wsdl4j-lib.version=1.6.3
|
||||
wsdl4j-lib.checksum.enabled=true
|
||||
wsdl4j-lib.checksum.algorithm=MD5|SHA-1
|
||||
wsdl4j-lib.checksum.value=cfc28d89625c5e88589aec7a9aee0208|6d106a6845a3d3477a1560008479312888e94f2f
|
||||
wsdl4j-lib.home=${base.path}/wsdl4j-${wsdl4j-lib.version}
|
||||
wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar
|
||||
wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${wsdl4j-lib.version}.jar
|
||||
|
||||
# ----- Eclipse JDT, version 4.5.1 or later -----#
|
||||
# See https://cwiki.apache.org/confluence/display/TOMCAT/Managing+Tomcat%27s+Dependency+on+the+Eclipse+JDT+Core+Batch+Compiler
|
||||
#
|
||||
# 4.6.3 is the latest release that runs on Java 7
|
||||
# Later versions can be used but the official builds need to use 4.6.3
|
||||
#
|
||||
# Checksum is from "SHA512 Checksums for 4.6.3" link at
|
||||
# http://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/
|
||||
# http://archive.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/checksum/eclipse-4.6.3-SUMSSHA512
|
||||
#
|
||||
jdt.version=4.6.3
|
||||
jdt.release=R-4.6.3-201703010400
|
||||
jdt.checksum.enabled=true
|
||||
jdt.checksum.algorithm=SHA-512
|
||||
jdt.checksum.value=372da97d5f37095a3616c730170dc541b93acb8f50370cd9b0d81fba4583e865f0c933dc012155f26638306b82a402eaab209123cd0a979fa7c86313c0fca477
|
||||
jdt.home=${base.path}/ecj-${jdt.version}
|
||||
jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
|
||||
# The download will be moved to the archive area eventually. We are taking care of that in advance.
|
||||
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
|
||||
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
|
||||
|
||||
# ----- Tomcat native library -----
|
||||
tomcat-native.version=1.2.23
|
||||
tomcat-native.src.checksum.enabled=true
|
||||
tomcat-native.src.checksum.algorithm=SHA-512
|
||||
tomcat-native.src.checksum.value=89a0363961d322a87f4e752f4727f54f28ac6e4ad10fa21b6b7390c62b041d4068672d95495d9233c1cad7d6c1dc3c85fbd0186894085b3b94e476876af160ee
|
||||
tomcat-native.win.checksum.enabled=true
|
||||
tomcat-native.win.checksum.algorithm=SHA-512
|
||||
tomcat-native.win.checksum.value=b5d91d709241fea5f18fbaf2eb1dbad3c3014309ac72dfc10c0eb7c2f926a8e37a4c326ce251552bbd2b1f15b86c84ae72c33a259cc051765ab4322c91b5721b
|
||||
tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
|
||||
tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
|
||||
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
|
||||
tomcat-native.loc.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
|
||||
tomcat-native.win.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1c-win32-bin.zip
|
||||
tomcat-native.win.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1c-win32-bin.zip
|
||||
|
||||
# ----- NSIS, version 3.0 or later -----
|
||||
nsis.version=3.04
|
||||
nsis.checksum.enabled=true
|
||||
nsis.checksum.algorithm=MD5|SHA-1
|
||||
nsis.checksum.value=434e89380742d415ca9b91676cb92540|ed241f7384f4e59d84b9a62c71d1f6955b6a719a
|
||||
nsis.home=${base.path}/nsis-${nsis.version}
|
||||
nsis.exe=${nsis.home}/makensis.exe
|
||||
nsis.arch.dir=x86-unicode/
|
||||
nsis.installoptions.dll=${nsis.home}/Plugins/${nsis.arch.dir}InstallOptions.dll
|
||||
nsis.nsexec.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsExec.dll
|
||||
nsis.nsisdl.dll=${nsis.home}/Plugins/${nsis.arch.dir}NSISdl.dll
|
||||
nsis.system.dll=${nsis.home}/Plugins/${nsis.arch.dir}System.dll
|
||||
nsis.nsdialogs.dll=${nsis.home}/Plugins/${nsis.arch.dir}nsDialogs.dll
|
||||
nsis.loc=${base-sf.loc}/nsis/nsis-${nsis.version}.zip
|
||||
|
||||
# ----- Commons Daemon, version 1.2.0 or later -----
|
||||
commons-daemon.version=1.2.2
|
||||
|
||||
# checksum for commons-daemon-1.2.1-bin.tar.gz
|
||||
commons-daemon.bin.checksum.enabled=true
|
||||
commons-daemon.bin.checksum.algorithm=SHA-512
|
||||
commons-daemon.bin.checksum.value=f9fb917aaf398f61c42796eb4168664e076f81bc3fae82790eb39c723f03a1e7cbc2304161938d8d8993b7fbb718214b94740dbf9679f6ef93e85b5a2e861761
|
||||
|
||||
# checksums for commons-daemon-1.2.1-native-src.tar.gz, commons-daemon-1.2.1-bin-windows.zip
|
||||
commons-daemon.native.src.checksum.enabled=true
|
||||
commons-daemon.native.src.checksum.algorithm=SHA-512
|
||||
commons-daemon.native.src.checksum.value=45ad856a8a6b024e80905cfac5a741a57ab86479ecd65adab9641f5444d3a2362bb13d1ea38ec3db5eb89d30c29f2f6d3b0e48cbf2f60c081c4df2451acd1ab4
|
||||
commons-daemon.native.win.checksum.enabled=true
|
||||
commons-daemon.native.win.checksum.algorithm=SHA-512
|
||||
commons-daemon.native.win.checksum.value=16e7a6fc5bc83ada3bcf9e10cc69ef21400dc019d1f2be00caec0bce72c3bc5a7c72116878e12b4851a15bb473c0948a9c14e1a86b6addcefa6c20638dbcc88c
|
||||
|
||||
commons-daemon.home=${base.path}/commons-daemon-${commons-daemon.version}
|
||||
commons-daemon.jar=${commons-daemon.home}/commons-daemon-${commons-daemon.version}.jar
|
||||
commons-daemon.native.win.home=${commons-daemon.home}/windows
|
||||
commons-daemon.native.win.mgr.exe=${commons-daemon.native.win.home}/prunmgr.exe
|
||||
commons-daemon.native.src.tgz=${commons-daemon.home}/commons-daemon-${commons-daemon.version}-native-src.tar.gz
|
||||
commons-daemon.native.win.zip=${commons-daemon.home}/commons-daemon-${commons-daemon.version}-bin-windows-signed.zip
|
||||
commons-daemon.bin.loc.1=${base-commons.loc.1}/daemon/binaries/commons-daemon-${commons-daemon.version}-bin.tar.gz
|
||||
commons-daemon.bin.loc.2=${base-commons.loc.2}/daemon/binaries/commons-daemon-${commons-daemon.version}-bin.tar.gz
|
||||
commons-daemon.native.src.loc.1=${base-commons.loc.1}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz
|
||||
commons-daemon.native.src.loc.2=${base-commons.loc.2}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz
|
||||
commons-daemon.native.win.loc.1=${base-commons.loc.1}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip
|
||||
commons-daemon.native.win.loc.2=${base-commons.loc.2}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip
|
||||
|
||||
# ----- JUnit Unit Test Suite, version 4.11 or later -----
|
||||
junit.version=4.12
|
||||
junit.checksum.enabled=true
|
||||
junit.checksum.algorithm=MD5|SHA-1
|
||||
junit.checksum.value=5b38c40c97fbd0adee29f91e60405584|2973d150c0dc1fefe998f834810d68f278ea58ec
|
||||
junit.home=${base.path}/junit-${junit.version}
|
||||
junit.jar=${junit.home}/junit-${junit.version}.jar
|
||||
junit.loc=${base-maven.loc}/junit/junit/${junit.version}/junit-${junit.version}.jar
|
||||
|
||||
# ----- Hamcrest Library, used by JUnit, version 1.3 or later ----
|
||||
hamcrest.version=1.3
|
||||
hamcrest.checksum.enabled=true
|
||||
hamcrest.checksum.algorithm=MD5|SHA-1
|
||||
hamcrest.checksum.value=6393363b47ddcbba82321110c3e07519|42a25dc3219429f0e5d060061f71acb49bf010a0
|
||||
hamcrest.home=${base.path}/hamcrest-${hamcrest.version}
|
||||
hamcrest.jar=${hamcrest.home}/hamcrest-core-${hamcrest.version}.jar
|
||||
hamcrest.loc=${base-maven.loc}/org/hamcrest/hamcrest-core/${hamcrest.version}/hamcrest-core-${hamcrest.version}.jar
|
||||
|
||||
# ----- EasyMock, version 3.2 or later -----
|
||||
easymock.version=3.2
|
||||
easymock.checksum.enabled=true
|
||||
easymock.checksum.algorithm=MD5|SHA-1
|
||||
easymock.checksum.value=0da4291328e18798621c36fdf8bc4c3a|00c82f7fa3ef377d8954b1db25123944b5af2ba4
|
||||
easymock.home=${base.path}/easymock-${easymock.version}
|
||||
easymock.jar=${easymock.home}/easymock-${easymock.version}.jar
|
||||
easymock.loc=${base-maven.loc}/org/easymock/easymock/${easymock.version}/easymock-${easymock.version}.jar
|
||||
|
||||
# ----- cglib, used by EasyMock, version 2.2 or later -----
|
||||
cglib.version=2.2.2
|
||||
cglib.checksum.enabled=true
|
||||
cglib.checksum.algorithm=MD5|SHA-1
|
||||
cglib.checksum.value=af93e373d7ddf35db0e9612480d9ed13|00d456bb230c70c0b95c76fb28e429d42f275941
|
||||
cglib.home=${base.path}/cglib-${cglib.version}
|
||||
cglib.jar=${cglib.home}/cglib-nodep-${cglib.version}.jar
|
||||
cglib.loc=${base-maven.loc}/cglib/cglib-nodep/${cglib.version}/cglib-nodep-${cglib.version}.jar
|
||||
|
||||
# ----- objenesis, used by EasyMock, version 1.2 or later -----
|
||||
objenesis.version=1.2
|
||||
objenesis.checksum.enabled=true
|
||||
objenesis.checksum.algorithm=MD5|SHA-1
|
||||
objenesis.checksum.value=bee117291d50b41b8e8cf0ac5435df1d|bfcb0539a071a4c5a30690388903ac48c0667f2a
|
||||
objenesis.home=${base.path}/objenesis-${objenesis.version}
|
||||
objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar
|
||||
objenesis.loc=${base-maven.loc}/org/objenesis/objenesis/${objenesis.version}/objenesis-${objenesis.version}.jar
|
||||
|
||||
# ----- Checkstyle, version 6.16 or later -----
|
||||
# Checkstyle 7 requires Java 8
|
||||
# Therefore, use checkstyle-backport-jre6
|
||||
checkstyle.version=8.22
|
||||
checkstyle.checksum.enabled=true
|
||||
checkstyle.checksum.algorithm=MD5|SHA-1
|
||||
checkstyle.checksum.value=03cb9ae24d4103134095ccd650b3bbb7|32d2996bedc97ee4e22c50e6ff5a8b571c8d816e
|
||||
checkstyle.home=${base.path}/checkstyle-backport-jre6-${checkstyle.version}
|
||||
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
|
||||
checkstyle.loc=${base-checkstyle.loc}/com/puppycrawl/tools/checkstyle-backport-jre6/${checkstyle.version}/checkstyle-backport-jre6-${checkstyle.version}-all.jar
|
||||
|
||||
# ----- Cobertura code coverage tool -----
|
||||
cobertura.version=2.1.1
|
||||
cobertura.checksum.enabled=true
|
||||
cobertura.checksum.algorithm=MD5|SHA-1
|
||||
cobertura.checksum.value=4f46638aa8e4d89565c038092398ea06|99cb44d36555feedcedc46263c23c2f5394ef342
|
||||
cobertura.home=${base.path}/cobertura-${cobertura.version}
|
||||
cobertura.jar=${cobertura.home}/cobertura-${cobertura.version}.jar
|
||||
cobertura.loc=${base-sf.loc}/cobertura/cobertura-${cobertura.version}-bin.tar.gz
|
||||
|
||||
# ----- Findbugs -----
|
||||
findbugs.version=3.1.12
|
||||
findbugs.checksum.enabled=true
|
||||
findbugs.checksum.algorithm=MD5|SHA-1
|
||||
findbugs.checksum.value=8c54502a8e1b78ea6b173a186ce6f379|95114d9aaeeba7bd4ea5a3d6a2167cd6c87bb943
|
||||
findbugs.home=${base.path}/spotbugs-${findbugs.version}
|
||||
findbugs.jar=${findbugs.home}/lib/spotbugs-ant.jar
|
||||
findbugs.loc=${base-maven.loc}/com/github/spotbugs/spotbugs/${findbugs.version}/spotbugs-${findbugs.version}.tgz
|
||||
|
||||
# ----- SAAJ API, used by Code Signing for releases -----
|
||||
# ----- No longer part of JRE from Java 11 onwards -----
|
||||
# ----- CDDL Licensed -----
|
||||
saaj-api.version=1.3.5
|
||||
saaj-api.checksum.enabled=true
|
||||
saaj-api.checksum.algorithm=MD5|SHA-1
|
||||
saaj-api.checksum.value=caae8b4bf2c551155815331e9e96256f|1c399a7fea4d0262a6a39750e419c24f0c769586
|
||||
saaj-api.home=${base.path}/saaj-api-${saaj-api.version}
|
||||
saaj-api.jar=${saaj-api.home}/saaj-api-${saaj-api.version}.jar
|
||||
saaj-api.loc=${base-maven.loc}/javax/xml/soap/saaj-api/${saaj-api.version}/saaj-api-${saaj-api.version}.jar
|
||||
271
conf/catalina.policy
Normal file
271
conf/catalina.policy
Normal file
@@ -0,0 +1,271 @@
|
||||
// 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;
|
||||
};
|
||||
|
||||
|
||||
// ========== 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.AsyncLoggerPollInterval", "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.*";
|
||||
|
||||
// The cookie code needs these.
|
||||
permission java.util.PropertyPermission
|
||||
"org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
|
||||
permission java.util.PropertyPermission
|
||||
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
|
||||
|
||||
// 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";
|
||||
|
||||
// Applications need to access these packages to use the Servlet 4.0 Preview
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.servlet4preview.http";
|
||||
};
|
||||
|
||||
|
||||
// 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" {
|
||||
// };
|
||||
214
conf/catalina.properties
Normal file
214
conf/catalina.properties
Normal file
@@ -0,0 +1,214 @@
|
||||
# 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,\
|
||||
bootstrap.jar,\
|
||||
catalina-ant.jar,\
|
||||
catalina-ha.jar,\
|
||||
catalina-jmx-remote.jar,\
|
||||
catalina-storeconfig.jar,\
|
||||
catalina-tribes.jar,\
|
||||
catalina-ws.jar,\
|
||||
catalina.jar,\
|
||||
cglib-*.jar,\
|
||||
cobertura-*.jar,\
|
||||
commons-beanutils*.jar,\
|
||||
commons-codec*.jar,\
|
||||
commons-collections*.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,\
|
||||
dom4j-*.jar,\
|
||||
easymock-*.jar,\
|
||||
ecj-*.jar,\
|
||||
el-api.jar,\
|
||||
geronimo-spec-jaxrpc*.jar,\
|
||||
h2*.jar,\
|
||||
hamcrest-*.jar,\
|
||||
hibernate*.jar,\
|
||||
httpclient*.jar,\
|
||||
icu4j-*.jar,\
|
||||
jasper-el.jar,\
|
||||
jasper.jar,\
|
||||
jaspic-api.jar,\
|
||||
jaxb-*.jar,\
|
||||
jaxen-*.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,\
|
||||
oro-*.jar,\
|
||||
servlet-api-*.jar,\
|
||||
servlet-api.jar,\
|
||||
slf4j*.jar,\
|
||||
taglibs-standard-spec-*.jar,\
|
||||
tagsoup-*.jar,\
|
||||
tomcat-api.jar,\
|
||||
tomcat-coyote.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,\
|
||||
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
|
||||
|
||||
# This system property is deprecated. Use the relaxedPathChars relaxedQueryChars
|
||||
# attributes of the Connector instead. These attributes permit a wider range of
|
||||
# characters to be configured as valid.
|
||||
# Allow for changes to HTTP request validation
|
||||
# WARNING: Using this option may expose the server to CVE-2016-6816
|
||||
#tomcat.util.http.parser.HttpParser.requestTargetAllow=|
|
||||
30
conf/context.xml
Normal file
30
conf/context.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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>${catalina.base}/conf/web.xml</WatchedResource>
|
||||
|
||||
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
|
||||
<!--
|
||||
<Manager pathname="" />
|
||||
-->
|
||||
</Context>
|
||||
23
conf/jaspic-providers.xml
Normal file
23
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
conf/jaspic-providers.xsd
Normal file
53
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>
|
||||
75
conf/logging.properties
Normal file
75
conf/logging.properties
Normal file
@@ -0,0 +1,75 @@
|
||||
# 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 = FINE
|
||||
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
|
||||
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
|
||||
1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8
|
||||
|
||||
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
|
||||
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
|
||||
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
|
||||
2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8
|
||||
|
||||
3manager.org.apache.juli.AsyncFileHandler.level = FINE
|
||||
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
|
||||
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
|
||||
3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
|
||||
|
||||
4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
|
||||
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.encoding = UTF-8
|
||||
|
||||
java.util.logging.ConsoleHandler.level = FINE
|
||||
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 in TldLocationsCache, uncomment the following line:
|
||||
#org.apache.jasper.compiler.TldLocationsCache.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
|
||||
171
conf/server.xml
Normal file
171
conf/server.xml
Normal file
@@ -0,0 +1,171 @@
|
||||
<?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 library loader. Documentation at /docs/apr.html -->
|
||||
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
|
||||
<!-- 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" />
|
||||
<!-- A "Connector" using the shared thread pool-->
|
||||
<!--
|
||||
<Connector executor="tomcatThreadPool"
|
||||
port="8080" protocol="HTTP/1.1"
|
||||
connectionTimeout="20000"
|
||||
redirectPort="8443" />
|
||||
-->
|
||||
<!-- 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">
|
||||
<SSLHostConfig>
|
||||
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
|
||||
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" >
|
||||
<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" />
|
||||
-->
|
||||
|
||||
<!-- 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>
|
||||
44
conf/tomcat-users.xml
Normal file
44
conf/tomcat-users.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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">
|
||||
<!--
|
||||
NOTE: 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. It is
|
||||
strongly recommended that you do NOT use one of the users in the commented out
|
||||
section below since they are intended for use with the examples web
|
||||
application.
|
||||
-->
|
||||
<!--
|
||||
NOTE: 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
conf/tomcat-users.xsd
Normal file
59
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:sequence>
|
||||
<xs:element name="role" minOccurs="0" maxOccurs="unbounded">
|
||||
<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" minOccurs="0" maxOccurs="unbounded">
|
||||
<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" minOccurs="0" maxOccurs="unbounded">
|
||||
<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:sequence>
|
||||
<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>
|
||||
4731
conf/web.xml
Normal file
4731
conf/web.xml
Normal file
File diff suppressed because it is too large
Load Diff
37
java/javax/annotation/Generated.java
Normal file
37
java/javax/annotation/Generated.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.0
|
||||
*/
|
||||
@Documented
|
||||
@Target({ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR,
|
||||
ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD,
|
||||
ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Generated {
|
||||
public String[] value();
|
||||
public String date() default "";
|
||||
public String comments() default "";
|
||||
}
|
||||
31
java/javax/annotation/ManagedBean.java
Normal file
31
java/javax/annotation/ManagedBean.java
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.1
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface ManagedBean {
|
||||
String value() default "";
|
||||
}
|
||||
33
java/javax/annotation/PostConstruct.java
Normal file
33
java/javax/annotation/PostConstruct.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.0
|
||||
*/
|
||||
@Documented
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface PostConstruct {
|
||||
// No attributes
|
||||
}
|
||||
33
java/javax/annotation/PreDestroy.java
Normal file
33
java/javax/annotation/PreDestroy.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.0
|
||||
*/
|
||||
@Documented
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface PreDestroy {
|
||||
// No attributes
|
||||
}
|
||||
33
java/javax/annotation/Priority.java
Normal file
33
java/javax/annotation/Priority.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package javax.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @since Common Annotations 1.2
|
||||
*/
|
||||
@Documented
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Priority {
|
||||
int value();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user