init
30
webapps/ROOT/WEB-INF/web.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.
|
||||
-->
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1"
|
||||
metadata-complete="true">
|
||||
|
||||
<display-name>Welcome to Tomcat</display-name>
|
||||
<description>
|
||||
Welcome to Tomcat
|
||||
</description>
|
||||
|
||||
</web-app>
|
||||
295
webapps/ROOT/asf-logo-wide.svg
Normal file
@@ -0,0 +1,295 @@
|
||||
<?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.
|
||||
-->
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Apache_Logo_Horizontal" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 9835 1713.9" enable-background="new 0 0 9835 1713.9" xml:space="preserve">
|
||||
<path fill="#6D6E71" d="M1069.6,296.4v92.2h-11.8v-92.2h-33.7V285h79.4v11.4H1069.6z"/>
|
||||
<path fill="#6D6E71" d="M1234.8,388.5V343h-62.4v45.6h-11.8V285h11.8v46.8h62.4V285h11.8v103.6H1234.8z"/>
|
||||
<path fill="#6D6E71" d="M1329.2,296.4v34h52.2v11.4h-52.2v35.5h60.4v11.3h-72.2V285h70.3v11.4H1329.2z"/>
|
||||
<path fill="#D22128" d="M933.7,1098.5l247.5-591.6h47.5l247.5,591.6h-62.5l-76.7-185h-265.8l-75.8,185H933.7z M1205.4,575.2
|
||||
l-121.7,292.5h240L1205.4,575.2z"/>
|
||||
<path fill="#D22128" d="M1540.1,1098.5V506.9h245c101.7,0,175,94.2,175,185.8c0,96.7-68.3,187.5-170,187.5h-192.5v218.3H1540.1z
|
||||
M1597.6,828.5h189.1c70,0,115-64.2,115-135.8c0-74.2-55-134.2-120-134.2h-184.1V828.5z"/>
|
||||
<path fill="#D22128" d="M1927.7,1098.5l247.5-591.6h47.5l247.5,591.6h-62.5l-76.7-185h-265.8l-75.8,185H1927.7z M2199.3,575.2
|
||||
l-121.7,292.5h240L2199.3,575.2z"/>
|
||||
<path fill="#D22128" d="M2750.1,503.6c105,0,181.6,53.3,218.3,129.2l-46.7,28.3c-37.5-78.3-110.8-105-175-105
|
||||
c-141.7,0-219.1,126.7-219.1,245.8c0,130.8,95.8,249.1,221.6,249.1c66.7,0,145-33.3,182.5-110l48.3,25
|
||||
c-38.3,88.3-143.3,137.5-234.1,137.5c-162.5,0-276.6-155-276.6-305C2469.3,656,2571.7,503.6,2750.1,503.6z"/>
|
||||
<path fill="#D22128" d="M3528,506.9v591.6h-58.3V821.9h-350.8v276.6h-57.5V506.9h57.5v263.3h350.8V506.9H3528z"/>
|
||||
<path fill="#D22128" d="M4059.1,1046.8v51.7h-397.5V506.9h390v51.7h-332.5v213.3h290V821h-290v225.8H4059.1z"/>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-4229.6655" y1="-4143.6401" x2="-3987.5886" y2="-3860.573" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0" style="stop-color:#F69923"/>
|
||||
<stop offset="0.3123" style="stop-color:#F79A23"/>
|
||||
<stop offset="0.8383" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_1_)" d="M729.5,8.1C702.6,24,657.9,68.9,604.6,134l49,92.5c34.4-49.2,69.3-93.4,104.5-131.2
|
||||
c2.7-3,4.1-4.4,4.1-4.4c-1.4,1.5-2.7,3-4.1,4.4c-11.4,12.6-46,52.9-98.2,133.1c50.2-2.5,127.5-12.8,190.4-23.5
|
||||
c18.7-105-18.4-153-18.4-153S784.8-24.6,729.5,8.1z"/>
|
||||
<path fill="none" d="M646.5,535.5c0.4-0.1,0.7-0.1,1.1-0.2l-7.1,0.8c-0.4,0.2-0.8,0.4-1.2,0.6C641.7,536.3,644.1,535.9,646.5,535.5z
|
||||
"/>
|
||||
<path fill="none" d="M596.5,701.1c-4,0.9-8.1,1.6-12.3,2.2C588.4,702.7,592.5,702,596.5,701.1z"/>
|
||||
<path fill="none" d="M256.7,1072.7c0.5-1.4,1-2.8,1.6-4.1c10.8-28.5,21.5-56.1,32-83.1c11.9-30.2,23.6-59.5,35.2-87.9
|
||||
c12.2-29.9,24.3-58.8,36.1-86.8c12.5-29.3,24.7-57.5,36.8-84.7c9.8-22.1,19.5-43.5,29-64.2c3.2-6.9,6.3-13.7,9.5-20.5
|
||||
c6.2-13.4,12.4-26.6,18.5-39.4c5.6-11.9,11.2-23.5,16.8-34.9c1.8-3.8,3.7-7.6,5.5-11.3c0.3-0.6,0.6-1.2,0.9-1.8l-6,0.7l-4.8-9.4
|
||||
c-0.5,0.9-0.9,1.8-1.4,2.7c-8.6,17.1-17.1,34.3-25.6,51.7c-4.9,10-9.7,20.1-14.6,30.3c-13.4,28.1-26.5,56.5-39.5,85
|
||||
c-13.1,28.8-25.9,57.8-38.5,86.9c-12.4,28.5-24.5,57.1-36.3,85.5c-11.8,28.4-23.4,56.8-34.7,84.9c-11.8,29.4-23.3,58.5-34.4,87.3
|
||||
c-2.5,6.5-5,13-7.5,19.4c-8.9,23.2-17.6,46.2-26.1,68.8l7.5,14.9l6.7-0.7c0.2-0.7,0.5-1.4,0.7-2
|
||||
C235.2,1129.9,246,1100.9,256.7,1072.7z"/>
|
||||
<path fill="none" d="M581.2,703.8L581.2,703.8C581.2,703.8,581.2,703.8,581.2,703.8C581.2,703.8,581.2,703.8,581.2,703.8z"/>
|
||||
<path fill="#BE202E" d="M564.9,784.6c-6.3,1.1-12.7,2.2-19.3,3.4c0,0-0.1,0-0.1,0.1c3.3-0.5,6.6-1,9.9-1.6
|
||||
C558.6,785.9,561.8,785.3,564.9,784.6z"/>
|
||||
<path opacity="0.35" fill="#BE202E" d="M564.9,784.6c-6.3,1.1-12.7,2.2-19.3,3.4c0,0-0.1,0-0.1,0.1c3.3-0.5,6.6-1,9.9-1.6
|
||||
C558.6,785.9,561.8,785.3,564.9,784.6z"/>
|
||||
<path fill="#BE202E" d="M581.3,703.7C581.3,703.8,581.3,703.8,581.3,703.7c-0.1,0-0.1,0.1-0.1,0.1c1-0.1,2.1-0.3,3.1-0.5
|
||||
c4.2-0.6,8.3-1.3,12.3-2.2C591.6,702,586.5,702.9,581.3,703.7L581.3,703.7L581.3,703.7z"/>
|
||||
<path opacity="0.35" fill="#BE202E" d="M581.3,703.7C581.3,703.8,581.3,703.8,581.3,703.7c-0.1,0-0.1,0.1-0.1,0.1
|
||||
c1-0.1,2.1-0.3,3.1-0.5c4.2-0.6,8.3-1.3,12.3-2.2C591.6,702,586.5,702.9,581.3,703.7L581.3,703.7L581.3,703.7z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-6021.2769" y1="-4174.8843" x2="-4294.1865" y2="-4174.8843" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0.3233" style="stop-color:#9E2064"/>
|
||||
<stop offset="0.6302" style="stop-color:#C92037"/>
|
||||
<stop offset="0.7514" style="stop-color:#CD2335"/>
|
||||
<stop offset="1" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_2_)" d="M509.2,465.4c14.9-27.8,30-55,45.2-81.5c15.8-27.5,31.8-54.2,48-79.9c1-1.5,1.9-3.1,2.9-4.6
|
||||
c16-25.3,32.1-49.6,48.4-72.9l-49-92.5c-3.7,4.5-7.4,9.1-11.1,13.7c-14.1,17.6-28.8,36.5-43.8,56.6c-17,22.6-34.4,46.8-52.1,72.2
|
||||
c-16.3,23.4-32.9,48-49.5,73.4c-14.1,21.6-28.3,43.9-42.4,66.7c-0.5,0.8-1,1.7-1.6,2.6l63.7,125.9
|
||||
C481.4,518.1,495.2,491.5,509.2,465.4z"/>
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-5812.7939" y1="-4001.6594" x2="-4783.6157" y2="-4001.6594" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0" style="stop-color:#282662"/>
|
||||
<stop offset="9.548390e-02" style="stop-color:#662E8D"/>
|
||||
<stop offset="0.7882" style="stop-color:#9F2064"/>
|
||||
<stop offset="0.9487" style="stop-color:#CD2032"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_3_)" d="M218.8,1174.8c-8.4,23.2-16.9,46.8-25.4,70.9c-0.1,0.4-0.2,0.7-0.4,1.1c-1.2,3.4-2.4,6.8-3.6,10.2
|
||||
c-5.7,16.3-10.7,30.9-22.1,64.2c18.8,8.6,33.9,31.1,48.1,56.7c-1.5-26.5-12.5-51.4-33.3-70.7c92.6,4.2,172.4-19.2,213.6-86.9
|
||||
c3.7-6,7.1-12.4,10.1-19.1c-18.8,23.8-42,33.8-85.7,31.4c-0.1,0-0.2,0.1-0.3,0.1c0.1,0,0.2-0.1,0.3-0.1
|
||||
c64.4-28.8,96.7-56.5,125.3-102.3c6.8-10.9,13.3-22.7,20.1-35.9c-56.3,57.8-121.6,74.3-190.3,61.8l-51.6,5.7
|
||||
C222,1166.1,220.4,1170.4,218.8,1174.8z"/>
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-5924.2744" y1="-4190.9775" x2="-4197.1841" y2="-4190.9775" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0.3233" style="stop-color:#9E2064"/>
|
||||
<stop offset="0.6302" style="stop-color:#C92037"/>
|
||||
<stop offset="0.7514" style="stop-color:#CD2335"/>
|
||||
<stop offset="1" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_4_)" d="M242.9,1059.3c11.1-28.8,22.6-57.9,34.4-87.3c11.3-28.1,22.9-56.5,34.7-84.9
|
||||
c11.8-28.5,24-57,36.3-85.5c12.6-29,25.4-58,38.5-86.9c12.9-28.5,26.1-56.9,39.5-85c4.8-10.1,9.7-20.2,14.6-30.3
|
||||
c8.4-17.4,17-34.6,25.6-51.7c0.5-0.9,0.9-1.8,1.4-2.7l-63.7-125.9c-1,1.7-2.1,3.4-3.1,5.1c-14.9,24.3-29.6,49.1-44.1,74.4
|
||||
c-14.7,25.6-29.1,51.7-43.1,78.1c-11.9,22.3-23.5,44.8-34.7,67.5c-2.3,4.6-4.5,9.2-6.7,13.7c-13.9,28.6-26.4,56.2-37.8,82.8
|
||||
c-12.9,30.1-24.2,58.8-34.1,86.1c-6.5,17.9-12.5,35.2-17.9,51.9c-4.5,14.2-8.7,28.4-12.7,42.6c-9.5,33.4-17.7,66.7-24.5,99.8
|
||||
l64,126.4c8.5-22.6,17.1-45.6,26.1-68.8C237.9,1072.3,240.4,1065.8,242.9,1059.3z"/>
|
||||
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-5798.3159" y1="-4167.6108" x2="-4890.6782" y2="-4167.6108" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0" style="stop-color:#282662"/>
|
||||
<stop offset="9.548390e-02" style="stop-color:#662E8D"/>
|
||||
<stop offset="0.7882" style="stop-color:#9F2064"/>
|
||||
<stop offset="0.9487" style="stop-color:#CD2032"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_5_)" d="M144.4,1025.6c-8,40.5-13.8,80.8-16.6,120.8c-0.1,1.4-0.2,2.8-0.3,4.2c-20-32-73.5-63.3-73.4-63
|
||||
c38.3,55.5,67.4,110.7,71.7,164.8c-20.5,4.2-48.6-1.9-81.1-13.8c33.9,31.1,59.3,39.7,69.2,42c-31.1,1.9-63.5,23.3-96.1,47.9
|
||||
c47.7-19.5,86.3-27.2,113.9-20.9c-43.8,124-87.7,260.9-131.6,406.2c13.5-4,21.5-13,26-25.3c7.8-26.3,59.8-199,141.2-425.9
|
||||
c2.3-6.5,4.6-12.9,7-19.5c0.7-1.8,1.3-3.6,2-5.4c8.6-23.8,17.5-48.1,26.7-72.9c2.1-5.6,4.2-11.3,6.3-17c0-0.1,0.1-0.2,0.1-0.3
|
||||
l-64-126.4C145,1022.6,144.7,1024.1,144.4,1025.6z"/>
|
||||
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="-5924.2744" y1="-4012.23" x2="-4197.1841" y2="-4012.23" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0.3233" style="stop-color:#9E2064"/>
|
||||
<stop offset="0.6302" style="stop-color:#C92037"/>
|
||||
<stop offset="0.7514" style="stop-color:#CD2335"/>
|
||||
<stop offset="1" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_6_)" d="M477.7,555.7c-1.8,3.7-3.7,7.5-5.5,11.3c-5.5,11.4-11.1,23-16.8,34.9c-6.1,12.8-12.3,26-18.5,39.4
|
||||
c-3.1,6.8-6.3,13.6-9.5,20.5c-9.5,20.7-19.2,42.1-29,64.2c-12.1,27.2-24.3,55.4-36.8,84.7c-11.9,27.9-23.9,56.8-36.1,86.8
|
||||
c-11.6,28.4-23.3,57.7-35.2,87.9c-10.6,27-21.3,54.6-32,83.1c-0.5,1.4-1,2.8-1.6,4.1c-10.7,28.3-21.5,57.3-32.4,87
|
||||
c-0.2,0.7-0.5,1.4-0.7,2l51.6-5.7c-1-0.2-2-0.3-3.1-0.5c61.6-7.7,143.6-53.7,196.5-110.6c24.4-26.2,46.5-57.1,67-93.3
|
||||
c15.2-26.9,29.6-56.8,43.2-89.8c11.9-28.9,23.3-60.1,34.4-94c-14.2,7.5-30.4,12.9-48.3,16.7c-3.1,0.7-6.3,1.3-9.6,1.9
|
||||
c-3.2,0.6-6.5,1.1-9.9,1.6l0,0l0,0c0,0,0.1,0,0.1-0.1c57.5-22.1,93.7-64.8,120.1-117.1c-15.1,10.3-39.7,23.8-69.2,30.3
|
||||
c-4,0.9-8.1,1.6-12.3,2.2c-1,0.1-2.1,0.3-3.1,0.5l0,0l0,0c0,0,0.1,0,0.1,0c0,0,0,0,0.1,0l0,0c19.9-8.3,36.8-17.7,51.4-28.7
|
||||
c3.1-2.4,6.2-4.8,9.1-7.3c4.5-3.8,8.7-7.9,12.7-12.2c2.6-2.7,5.1-5.5,7.5-8.4c5.7-6.8,11.1-14.2,16.1-22.1c1.5-2.4,3-4.9,4.5-7.5
|
||||
c1.9-3.7,3.7-7.3,5.5-10.8c8-16.1,14.5-30.5,19.6-43.2c2.6-6.3,4.8-12.2,6.7-17.6c0.8-2.2,1.5-4.3,2.2-6.3c2-6.1,3.7-11.5,5-16.2
|
||||
c2-7.1,3.1-12.7,3.8-16.8l0,0l0,0c-1.9,1.5-4.2,3.1-6.7,4.6c-17.3,10.4-47.1,19.8-71.1,24.2l47.3-5.2l-47.3,5.2
|
||||
c-0.4,0.1-0.7,0.1-1.1,0.2c-2.4,0.4-4.8,0.8-7.2,1.2c0.4-0.2,0.8-0.4,1.2-0.6l-161.9,17.7C478.3,554.5,478,555.1,477.7,555.7z"/>
|
||||
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-6031.4116" y1="-4021.106" x2="-4304.3213" y2="-4021.106" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0.3233" style="stop-color:#9E2064"/>
|
||||
<stop offset="0.6302" style="stop-color:#C92037"/>
|
||||
<stop offset="0.7514" style="stop-color:#CD2335"/>
|
||||
<stop offset="1" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_7_)" d="M660,228.4c-14.4,22.1-30.1,47.2-47.1,75.6c-0.9,1.5-1.8,3-2.7,4.5c-14.6,24.6-30.1,51.6-46.4,81.2
|
||||
c-14.1,25.5-28.8,52.9-44,82.4c-13.3,25.7-27,52.9-41.1,81.7l161.9-17.7c47.2-21.7,68.3-41.3,88.7-69.7c5.4-7.8,10.9-16,16.3-24.5
|
||||
c16.6-26,32.9-54.6,47.5-83c14.1-27.4,26.5-54.7,36-79.2c6.1-15.6,10.9-30.1,14.3-42.8c2.9-11.2,5.3-21.9,7.1-32.1
|
||||
C787.5,215.6,710.2,225.9,660,228.4z"/>
|
||||
<path fill="#BE202E" d="M555.4,786.4c-3.2,0.6-6.5,1.1-9.9,1.6l0,0C548.8,787.5,552.1,787,555.4,786.4z"/>
|
||||
<path opacity="0.35" fill="#BE202E" d="M555.4,786.4c-3.2,0.6-6.5,1.1-9.9,1.6l0,0C548.8,787.5,552.1,787,555.4,786.4z"/>
|
||||
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="-5924.2744" y1="-3959.0669" x2="-4197.1841" y2="-3959.0669" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0.3233" style="stop-color:#9E2064"/>
|
||||
<stop offset="0.6302" style="stop-color:#C92037"/>
|
||||
<stop offset="0.7514" style="stop-color:#CD2335"/>
|
||||
<stop offset="1" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_8_)" d="M555.4,786.4c-3.2,0.6-6.5,1.1-9.9,1.6l0,0C548.8,787.5,552.1,787,555.4,786.4z"/>
|
||||
<path fill="#BE202E" d="M581.2,703.8c1-0.1,2.1-0.3,3.1-0.5C583.2,703.5,582.2,703.7,581.2,703.8L581.2,703.8z"/>
|
||||
<path opacity="0.35" fill="#BE202E" d="M581.2,703.8c1-0.1,2.1-0.3,3.1-0.5C583.2,703.5,582.2,703.7,581.2,703.8L581.2,703.8z"/>
|
||||
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="-5924.2744" y1="-3965.1499" x2="-4197.1841" y2="-3965.1499" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0.3233" style="stop-color:#9E2064"/>
|
||||
<stop offset="0.6302" style="stop-color:#C92037"/>
|
||||
<stop offset="0.7514" style="stop-color:#CD2335"/>
|
||||
<stop offset="1" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_9_)" d="M581.2,703.8c1-0.1,2.1-0.3,3.1-0.5C583.2,703.5,582.2,703.7,581.2,703.8L581.2,703.8z"/>
|
||||
<path fill="#BE202E" d="M581.3,703.8C581.3,703.8,581.3,703.8,581.3,703.8L581.3,703.8L581.3,703.8L581.3,703.8
|
||||
C581.3,703.8,581.3,703.8,581.3,703.8z"/>
|
||||
<path opacity="0.35" fill="#BE202E" d="M581.3,703.8C581.3,703.8,581.3,703.8,581.3,703.8L581.3,703.8L581.3,703.8L581.3,703.8
|
||||
C581.3,703.8,581.3,703.8,581.3,703.8z"/>
|
||||
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="-4954.02" y1="-3966.3701" x2="-4572.2764" y2="-3966.3701" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 6189.0356 -1936.8361)">
|
||||
<stop offset="0.3233" style="stop-color:#9E2064"/>
|
||||
<stop offset="0.6302" style="stop-color:#C92037"/>
|
||||
<stop offset="0.7514" style="stop-color:#CD2335"/>
|
||||
<stop offset="1" style="stop-color:#E97826"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_10_)" d="M581.3,703.8C581.3,703.8,581.3,703.8,581.3,703.8L581.3,703.8L581.3,703.8L581.3,703.8
|
||||
C581.3,703.8,581.3,703.8,581.3,703.8z"/>
|
||||
<path fill="#6D6E71" d="M4552.4,508.2c12,3.6,22.6,8.4,31.5,14.5l-10.5,23c-9.2-6.1-19-10.6-29.4-13.6c-10.4-3-20.3-4.5-29.7-4.5
|
||||
c-13.8,0-24.9,2.5-33.2,7.5c-8.3,5-12.4,12-12.4,21.1c0,7.8,2.3,14.2,6.9,19.3c4.6,5.1,10.3,9,17.3,11.9c6.9,2.8,16.4,6.1,28.5,9.8
|
||||
c14.6,4.7,26.4,9.1,35.3,13.1c8.9,4.1,16.5,10.1,22.9,18.1c6.3,8,9.5,18.5,9.5,31.5c0,11.9-3.2,22.2-9.6,31.1
|
||||
c-6.4,8.9-15.5,15.7-27.3,20.6c-11.8,4.9-25.3,7.3-40.6,7.3c-15.3,0-30.2-3-44.7-8.9c-14.4-5.9-26.8-13.9-37.2-23.8l10.9-22
|
||||
c9.8,9.6,21,17,33.8,22.3c12.8,5.3,25.3,7.9,37.4,7.9c15.5,0,27.8-3,36.8-9c9-6,13.4-14.1,13.4-24.3c0-8-2.3-14.5-7-19.7
|
||||
c-4.7-5.2-10.5-9.2-17.4-12.1c-6.9-2.9-16.4-6.1-28.5-9.7c-14.4-4.3-26.2-8.4-35.2-12.4c-9-4-16.6-9.9-22.9-17.8
|
||||
c-6.2-7.9-9.3-18.2-9.3-31.1c0-11.1,3.1-20.8,9.2-29.1c6.1-8.4,14.8-14.8,26.1-19.4c11.3-4.6,24.2-6.9,38.9-6.9
|
||||
C4528.2,502.8,4540.3,504.6,4552.4,508.2z"/>
|
||||
<path fill="#6D6E71" d="M4870.3,517.6c17.1,9.6,30.7,22.6,40.7,39.1c10,16.4,15,34.5,15,54.2c0,19.8-5,38-15,54.5
|
||||
c-10,16.5-23.6,29.6-40.7,39.3c-17.1,9.7-35.9,14.5-56.2,14.5c-20.6,0-39.5-4.8-56.6-14.5c-17.1-9.7-30.7-22.8-40.7-39.3
|
||||
c-10-16.5-15-34.7-15-54.5c0-19.8,5-38,15-54.5c10-16.5,23.6-29.5,40.7-39c17.1-9.5,36-14.3,56.6-14.3
|
||||
C4834.4,503.1,4853.2,507.9,4870.3,517.6z M4770.5,537.8c-13.4,7.6-24,17.8-32,30.6c-8,12.9-12,27-12,42.4c0,15.5,4,29.8,12,42.7
|
||||
c8,13,18.6,23.2,32,30.7c13.3,7.5,27.9,11.3,43.6,11.3c15.7,0,30.2-3.8,43.4-11.3c13.2-7.5,23.7-17.8,31.6-30.7
|
||||
c7.9-12.9,11.8-27.2,11.8-42.7s-3.9-29.7-11.8-42.5c-7.9-12.8-18.4-23-31.7-30.6c-13.3-7.6-27.7-11.4-43.3-11.4
|
||||
C4798.4,526.4,4783.8,530.2,4770.5,537.8z"/>
|
||||
<path fill="#6D6E71" d="M5080.3,527.3v75.3h100.1v23.6h-100.1V718h-24.5V503.7h136.1v23.6H5080.3z"/>
|
||||
<path fill="#6D6E71" d="M5390.7,527.3V718h-24.5V527.3h-69.6v-23.6h164.2v23.6H5390.7z"/>
|
||||
<path fill="#6D6E71" d="M5777.5,718l-57.8-180.5L5661.1,718h-25l-71.7-214.3h26.3l58.9,185.9l58.1-185.6l24.5-0.3l58.7,185.9
|
||||
l58.1-185.9h25.4L5802.6,718H5777.5z"/>
|
||||
<path fill="#6D6E71" d="M5996.7,663.9l-23.9,54.1h-26l96.1-214.3h25.4l95.8,214.3h-26.6l-23.9-54.1H5996.7z M6054.9,531.7
|
||||
l-47.7,108.6h96.1L6054.9,531.7z"/>
|
||||
<path fill="#6D6E71" d="M6377,649.7c-6.1,0.4-10.9,0.6-14.3,0.6h-56.9V718h-24.5V503.7h81.4c26.7,0,47.4,6.3,62.2,18.8
|
||||
c14.8,12.6,22.2,30.3,22.2,53.2c0,17.5-4.1,32.2-12.4,44c-8.3,11.8-20.1,20.3-35.6,25.5l50.1,72.8h-27.8L6377,649.7z M6407.7,614
|
||||
c10.5-8.6,15.8-21.1,15.8-37.7c0-16.1-5.3-28.3-15.8-36.6c-10.5-8.3-25.5-12.4-45.1-12.4h-56.9v99.5h56.9
|
||||
C6382.2,626.9,6397.2,622.6,6407.7,614z"/>
|
||||
<path fill="#6D6E71" d="M6608.2,527.3v70.4h108v23.6h-108v73.4h124.9V718h-149.4V503.7H6729v23.6H6608.2z"/>
|
||||
<path fill="#6D6E71" d="M7074.8,527.3v75.3h100.1v23.6h-100.1V718h-24.5V503.7h136.1v23.6H7074.8z"/>
|
||||
<path fill="#6D6E71" d="M7457.7,517.6c17.1,9.6,30.7,22.6,40.7,39.1c10,16.4,15,34.5,15,54.2c0,19.8-5,38-15,54.5
|
||||
c-10,16.5-23.6,29.6-40.7,39.3c-17.1,9.7-35.9,14.5-56.2,14.5c-20.6,0-39.5-4.8-56.6-14.5c-17.1-9.7-30.7-22.8-40.7-39.3
|
||||
c-10-16.5-15-34.7-15-54.5c0-19.8,5-38,15-54.5c10-16.5,23.6-29.5,40.7-39c17.1-9.5,36-14.3,56.6-14.3
|
||||
C7421.8,503.1,7440.5,507.9,7457.7,517.6z M7357.9,537.8c-13.4,7.6-24,17.8-32,30.6c-8,12.9-12,27-12,42.4c0,15.5,4,29.8,12,42.7
|
||||
c8,13,18.6,23.2,32,30.7c13.3,7.5,27.9,11.3,43.6,11.3c15.7,0,30.2-3.8,43.4-11.3c13.2-7.5,23.7-17.8,31.6-30.7
|
||||
c7.9-12.9,11.8-27.2,11.8-42.7s-3.9-29.7-11.8-42.5c-7.9-12.8-18.4-23-31.7-30.6c-13.3-7.6-27.7-11.4-43.3-11.4
|
||||
C7385.7,526.4,7371.2,530.2,7357.9,537.8z"/>
|
||||
<path fill="#6D6E71" d="M7794.8,695.5c-15.9,15.8-37.9,23.7-65.9,23.7c-28.2,0-50.3-7.9-66.3-23.7c-16-15.8-24-37.7-24-65.7V503.7
|
||||
h24.5v126.1c0,20.6,5.9,36.7,17.6,48.3c11.8,11.6,27.8,17.4,48.1,17.4c20.4,0,36.4-5.7,48-17.3c11.6-11.5,17.3-27.7,17.3-48.5V503.7
|
||||
h24.5v126.1C7818.7,657.8,7810.7,679.7,7794.8,695.5z"/>
|
||||
<path fill="#6D6E71" d="M8115.1,718l-128.5-172v172h-24.5V503.7h25.4L8116,676V503.7h24.2V718H8115.1z"/>
|
||||
<path fill="#6D6E71" d="M8429.3,517.9c16.7,9.4,29.9,22.3,39.6,38.6c9.7,16.3,14.6,34.4,14.6,54.5s-4.9,38.2-14.6,54.5
|
||||
c-9.7,16.3-23,29.2-40,38.6c-16.9,9.4-35.8,14-56.5,14h-85.8V503.7h86.7C8394,503.7,8412.6,508.4,8429.3,517.9z M8311.2,694.7h62.5
|
||||
c15.7,0,30.1-3.6,43-10.8c12.9-7.2,23.2-17.2,30.7-30c7.5-12.7,11.3-27,11.3-42.7c0-15.7-3.8-30-11.5-42.7
|
||||
c-7.7-12.7-18-22.7-31.1-30.1c-13.1-7.4-27.5-11.1-43.3-11.1h-61.6V694.7z"/>
|
||||
<path fill="#6D6E71" d="M8622.8,663.9l-23.9,54.1h-26l96.1-214.3h25.4l95.8,214.3h-26.6l-23.9-54.1H8622.8z M8681,531.7l-47.7,108.6
|
||||
h96.1L8681,531.7z"/>
|
||||
<path fill="#6D6E71" d="M8950.8,527.3V718h-24.5V527.3h-69.6v-23.6h164.2v23.6H8950.8z"/>
|
||||
<path fill="#6D6E71" d="M9138.9,718V503.7h24.5V718H9138.9z"/>
|
||||
<path fill="#6D6E71" d="M9462.2,517.6c17.1,9.6,30.7,22.6,40.7,39.1c10,16.4,15,34.5,15,54.2c0,19.8-5,38-15,54.5
|
||||
c-10,16.5-23.6,29.6-40.7,39.3c-17.1,9.7-35.9,14.5-56.2,14.5c-20.6,0-39.5-4.8-56.6-14.5c-17.1-9.7-30.7-22.8-40.7-39.3
|
||||
c-10-16.5-15-34.7-15-54.5c0-19.8,5-38,15-54.5c10-16.5,23.6-29.5,40.7-39c17.1-9.5,36-14.3,56.6-14.3
|
||||
C9426.4,503.1,9445.1,507.9,9462.2,517.6z M9362.4,537.8c-13.4,7.6-24,17.8-32,30.6c-8,12.9-12,27-12,42.4c0,15.5,4,29.8,12,42.7
|
||||
c8,13,18.6,23.2,32,30.7c13.3,7.5,27.9,11.3,43.6,11.3c15.7,0,30.2-3.8,43.4-11.3c13.2-7.5,23.7-17.8,31.6-30.7
|
||||
c7.9-12.9,11.8-27.2,11.8-42.7s-3.9-29.7-11.8-42.5c-7.9-12.8-18.4-23-31.7-30.6c-13.3-7.6-27.7-11.4-43.3-11.4
|
||||
C9390.3,526.4,9375.8,530.2,9362.4,537.8z"/>
|
||||
<path fill="#6D6E71" d="M9800.8,718l-128.5-172v172h-24.5V503.7h25.4L9801.7,676V503.7h24.2V718H9800.8z"/>
|
||||
<path fill="#6D6E71" d="M4204.9,500.9c9,9,13.5,19.9,13.5,32.6c0,12.7-4.5,23.6-13.5,32.7c-9,9.1-20,13.7-32.8,13.7
|
||||
c-12.9,0-23.8-4.5-32.7-13.5c-8.9-9-13.4-19.9-13.4-32.6c0-12.7,4.5-23.6,13.5-32.7c9-9.1,19.9-13.7,32.7-13.7
|
||||
C4185,487.4,4195.9,491.9,4204.9,500.9z M4201,562.4c7.9-8,11.8-17.6,11.8-28.8c0-11.2-3.9-20.7-11.7-28.6
|
||||
c-7.8-7.9-17.4-11.9-28.7-11.9c-11.3,0-20.9,4-28.8,11.9c-7.8,8-11.8,17.6-11.8,28.8c0,11.2,3.9,20.8,11.6,28.7
|
||||
c7.8,7.9,17.3,11.9,28.6,11.9S4193.1,570.4,4201,562.4z M4194.5,524.7c0,8.3-3.6,13.5-10.9,15.6l13.3,18h-10.7l-12-16.7h-11v16.7
|
||||
h-8.7v-50h18.8c7.6,0,13,1.3,16.3,3.9C4192.9,514.8,4194.5,519,4194.5,524.7z M4183.4,531.7c1.7-1.4,2.6-3.8,2.6-7.1
|
||||
c0-3.3-0.9-5.6-2.7-6.8c-1.8-1.3-4.9-1.9-9.5-1.9h-10.6v18h10.4C4178.4,533.9,4181.6,533.2,4183.4,531.7z"/>
|
||||
<path fill="#6D6E71" d="M4540.6,918.2c21.1,0,37.7,6.1,49.6,18.4c11.9,12.3,17.9,29.2,17.9,50.8V1097h-26.3V994.4
|
||||
c0-15.7-4.4-28-13.3-36.8s-21.2-13.2-36.9-13.2c-18.7,0.2-33.3,6.3-44,18.2c-10.7,11.9-16,27.5-16,46.9v87.4h-26.3V846.6h26.3V959
|
||||
C4483.1,932.2,4506.2,918.6,4540.6,918.2z"/>
|
||||
<path fill="#6D6E71" d="M4823.7,1063.6l7.4,21.3c-12.8,8.8-26.2,13.3-40.2,13.5c-13.7,0-24.7-4.2-32.9-12.7
|
||||
c-8.2-8.4-12.3-21.1-12.3-38V946.2h-25.6v-21.3h25.6V878h26v46.9l56.3-0.3v21.6h-56.3v96.8c0,19.8,7.9,29.7,23.6,29.7
|
||||
C4804.6,1072.7,4814,1069.6,4823.7,1063.6z"/>
|
||||
<path fill="#6D6E71" d="M5027.8,1063.6l7.4,21.3c-12.8,8.8-26.2,13.3-40.2,13.5c-13.7,0-24.7-4.2-32.9-12.7
|
||||
c-8.2-8.4-12.3-21.1-12.3-38V946.2h-25.6v-21.3h25.6V878h26v46.9l56.3-0.3v21.6h-56.3v96.8c0,19.8,7.9,29.7,23.6,29.7
|
||||
C5008.7,1072.7,5018.1,1069.6,5027.8,1063.6z"/>
|
||||
<path fill="#6D6E71" d="M5244.1,918.2c25.2,0,45.7,8.4,61.6,25.3c15.9,16.9,23.8,38.6,23.8,65.1c0,26.3-7.8,47.8-23.5,64.5
|
||||
c-15.6,16.6-36,25-61.2,25c-32.2,0-55.2-13-69.2-39.1v103.6h-26.3V919.2h26.3v38.4C5189.5,931.3,5212.4,918.2,5244.1,918.2z
|
||||
M5239.4,1074c18.4,0,33.6-6.2,45.5-18.6c11.9-12.3,17.9-28.2,17.9-47.6c0-19.1-6-34.9-17.9-47.4c-11.9-12.5-27.1-18.7-45.5-18.7
|
||||
c-18.7,0-34,6.2-45.9,18.6c-11.9,12.4-17.9,28.2-17.9,47.6c0,19.3,6,35.2,17.9,47.6C5205.4,1067.8,5220.7,1074,5239.4,1074z"/>
|
||||
<path fill="#6D6E71" d="M5449.9,964.4c4.5,0,8.3,1.7,11.5,5.1c3.2,3.4,4.7,7.5,4.7,12.5s-1.6,9.1-4.7,12.5c-3.2,3.4-7,5.1-11.5,5.1
|
||||
c-4.7,0-8.7-1.7-11.8-5.1c-3.2-3.4-4.7-7.5-4.7-12.5s1.6-9.1,4.7-12.5C5441.2,966.1,5445.2,964.4,5449.9,964.4z M5449.9,1064.6
|
||||
c4.5,0,8.3,1.7,11.5,5c3.2,3.4,4.7,7.5,4.7,12.5c0,4.9-1.6,9.1-4.7,12.5c-3.2,3.4-7,5.1-11.5,5.1c-4.7,0-8.7-1.7-11.8-5.1
|
||||
c-3.2-3.4-4.7-7.5-4.7-12.5c0-4.9,1.6-9.1,4.7-12.5C5441.2,1066.3,5445.2,1064.6,5449.9,1064.6z"/>
|
||||
<path fill="#6D6E71" d="M5574.1,1138.1h-22.9l105.3-317.8h23.3L5574.1,1138.1z"/>
|
||||
<path fill="#6D6E71" d="M5753.6,1138.1h-22.9l105.3-317.8h23.3L5753.6,1138.1z"/>
|
||||
<path fill="#6D6E71" d="M6140.5,1097h-27.3l-52.3-144.4l-52,144.4h-27.3l-66.5-177.8h27.7l52.6,150.5l51.6-150.5h27.7l52.3,150.5
|
||||
l52-150.5h27.3L6140.5,1097z"/>
|
||||
<path fill="#6D6E71" d="M6504.6,1097h-27.3L6425,952.6l-52,144.4h-27.3l-66.5-177.8h27.7l52.6,150.5l51.6-150.5h27.7l52.3,150.5
|
||||
l52-150.5h27.3L6504.6,1097z"/>
|
||||
<path fill="#6D6E71" d="M6868.6,1097h-27.3L6789,952.6l-52,144.4h-27.3l-66.5-177.8h27.7l52.6,150.5l51.6-150.5h27.7l52.3,150.5
|
||||
l52-150.5h27.3L6868.6,1097z"/>
|
||||
<path fill="#6D6E71" d="M7034.6,1064.6c4.5,0,8.3,1.7,11.5,5c3.2,3.4,4.7,7.5,4.7,12.5c0,4.9-1.6,9.1-4.7,12.5
|
||||
c-3.2,3.4-7,5.1-11.5,5.1c-4.7,0-8.7-1.7-11.8-5.1c-3.2-3.4-4.7-7.5-4.7-12.5c0-4.9,1.6-9.1,4.7-12.5
|
||||
C7026,1066.3,7029.9,1064.6,7034.6,1064.6z"/>
|
||||
<path fill="#6D6E71" d="M7283,1097v-27.3c-14.2,19.1-35.9,28.7-65.1,28.7c-18,0-32.6-5.1-43.7-15.4c-11.1-10.2-16.7-23.2-16.7-39
|
||||
c0-15.5,5.8-27.8,17.5-37c11.7-9.1,28-13.8,48.9-14h58.4v-10.5c0-13.3-4.1-23.5-12.1-30.7c-8.1-7.2-19.9-10.8-35.4-10.8
|
||||
c-18,0-36.8,6.7-56.4,20.2l-11.1-19.2c12.6-8.3,24.2-14.4,34.9-18.2s23.2-5.7,37.6-5.7c21.8,0,38.6,5.4,50.4,16.2
|
||||
c11.8,10.8,17.8,25.9,18.1,45.2l0.3,117.4H7283z M7222.9,1075.4c15.1,0,27.9-3.5,38.6-10.6c10.7-7.1,17.7-16.8,21.1-29.2v-21.3
|
||||
h-55.3c-30.1,0-45.2,9.6-45.2,28.7c0,9.9,3.7,17.8,11.1,23.6C7200.6,1072.5,7210.5,1075.4,7222.9,1075.4z"/>
|
||||
<path fill="#6D6E71" d="M7536.3,918.2c25.2,0,45.7,8.4,61.6,25.3c15.9,16.9,23.8,38.6,23.8,65.1c0,26.3-7.8,47.8-23.5,64.5
|
||||
c-15.6,16.6-36,25-61.2,25c-32.2,0-55.2-13-69.2-39.1v103.6h-26.3V919.2h26.3v38.4C7481.8,931.3,7504.6,918.2,7536.3,918.2z
|
||||
M7531.6,1074c18.4,0,33.6-6.2,45.5-18.6c11.9-12.3,17.9-28.2,17.9-47.6c0-19.1-6-34.9-17.9-47.4c-11.9-12.5-27.1-18.7-45.5-18.7
|
||||
c-18.7,0-34,6.2-45.9,18.6c-11.9,12.4-17.9,28.2-17.9,47.6c0,19.3,6,35.2,17.9,47.6C7497.6,1067.8,7512.9,1074,7531.6,1074z"/>
|
||||
<path fill="#6D6E71" d="M7850.8,1097v-27.3c-14.2,19.1-35.9,28.7-65.1,28.7c-18,0-32.6-5.1-43.7-15.4c-11.1-10.2-16.7-23.2-16.7-39
|
||||
c0-15.5,5.8-27.8,17.5-37c11.7-9.1,28-13.8,48.9-14h58.4v-10.5c0-13.3-4.1-23.5-12.1-30.7c-8.1-7.2-19.9-10.8-35.4-10.8
|
||||
c-18,0-36.8,6.7-56.4,20.2l-11.1-19.2c12.6-8.3,24.2-14.4,34.9-18.2c10.7-3.8,23.2-5.7,37.6-5.7c21.8,0,38.6,5.4,50.4,16.2
|
||||
c11.8,10.8,17.8,25.9,18.1,45.2l0.3,117.4H7850.8z M7790.7,1075.4c15.1,0,27.9-3.5,38.6-10.6c10.7-7.1,17.7-16.8,21.1-29.2v-21.3
|
||||
h-55.3c-30.2,0-45.2,9.6-45.2,28.7c0,9.9,3.7,17.8,11.1,23.6C7768.5,1072.5,7778.4,1075.4,7790.7,1075.4z"/>
|
||||
<path fill="#6D6E71" d="M8077.8,918.5c28.6-0.2,51.4,8.5,68.5,26.3l-14.5,18.6c-14.4-13.7-32.1-20.6-53-20.6
|
||||
c-18.4,0-33.6,6.1-45.4,18.2c-11.8,12.1-17.7,27.9-17.7,47.2s5.9,35.2,17.7,47.4c11.8,12.3,26.9,18.4,45.4,18.4
|
||||
c23.8,0,42.2-7.6,55-22.9l15.2,16.2c-16.9,20.5-40.6,30.7-71.2,30.7c-25.9,0-47-8.3-63.4-25c-16.4-16.6-24.6-38.2-24.6-64.8
|
||||
c0-26.3,8.3-47.9,24.8-64.6C8031.1,926.9,8052.2,918.5,8077.8,918.5z"/>
|
||||
<path fill="#6D6E71" d="M8366.7,918.2c21.1,0,37.7,6.1,49.6,18.4c11.9,12.3,17.9,29.2,17.9,50.8V1097h-26.3V994.4
|
||||
c0-15.7-4.4-28-13.3-36.8s-21.2-13.2-36.9-13.2c-18.7,0.2-33.3,6.3-44,18.2c-10.7,11.9-16,27.5-16,46.9v87.4h-26.3V846.6h26.3V959
|
||||
C8309.2,932.2,8332.2,918.6,8366.7,918.2z"/>
|
||||
<path fill="#6D6E71" d="M8635.6,918.5c28.1-0.2,49.3,8.7,63.6,26.6c14.3,18,20.8,42.4,19.4,73.2h-145.1c2.2,17.3,9.2,31.1,20.9,41.3
|
||||
c11.7,10.2,26.2,15.4,43.5,15.4c22.5,0,40.8-7.4,55-22.3l14.5,15.5c-17.8,19.8-41.6,29.7-71.5,29.7c-26.1,0-47.4-8.3-63.8-25
|
||||
c-16.4-16.6-24.6-38.2-24.6-64.8s8.2-48.1,24.6-64.8C8588.5,926.8,8609.7,918.5,8635.6,918.5z M8573.5,996.8H8695
|
||||
c-0.9-17.1-6.7-30.7-17.4-40.7c-10.7-10-24.7-15-42-15c-16.9,0-30.9,5.1-42.2,15.2C8582.1,966.4,8575.5,979.9,8573.5,996.8z"/>
|
||||
<path fill="#6D6E71" d="M8838,1064.6c4.5,0,8.3,1.7,11.5,5c3.1,3.4,4.7,7.5,4.7,12.5c0,4.9-1.6,9.1-4.7,12.5
|
||||
c-3.2,3.4-7,5.1-11.5,5.1c-4.7,0-8.7-1.7-11.8-5.1c-3.2-3.4-4.7-7.5-4.7-12.5c0-4.9,1.6-9.1,4.7-12.5
|
||||
C8829.3,1066.3,8833.3,1064.6,8838,1064.6z"/>
|
||||
<path fill="#6D6E71" d="M8983.4,943.5c16.9-16.6,38.5-25,64.8-25c26.3,0,47.9,8.3,64.8,25c16.9,16.6,25.3,38.1,25.3,64.5
|
||||
c0,26.5-8.5,48.2-25.3,64.9c-16.9,16.8-38.5,25.1-64.8,25.1c-26.3,0-47.9-8.4-64.8-25.1c-16.9-16.8-25.3-38.4-25.3-64.9
|
||||
C8958.1,981.6,8966.5,960.1,8983.4,943.5z M9094.1,960.8c-11.9-12.3-27.2-18.4-45.9-18.4c-18.7,0-34,6.1-45.9,18.4
|
||||
c-11.9,12.3-17.9,28.1-17.9,47.4c0,19.6,6,35.5,17.9,47.7c11.9,12.3,27.2,18.4,45.9,18.4c18.7,0,34-6.1,45.9-18.4
|
||||
c11.9-12.3,17.9-28.2,17.9-47.7C9111.9,988.9,9106,973.1,9094.1,960.8z"/>
|
||||
<path fill="#6D6E71" d="M9283.3,919.2v39.5c12.2-26.5,33.4-40,63.8-40.5v26.7c-18.4-0.2-33.3,4.9-44.5,15.3
|
||||
c-11.3,10.5-17.6,24.6-19.2,42.3v94.5H9257V919.2H9283.3z"/>
|
||||
<path fill="#6D6E71" d="M9610,919.2v159.2c0,25.9-8.2,46.5-24.5,61.7c-16.3,15.3-38,22.9-64.9,22.9c-26.3-0.2-50.6-8.8-72.9-25.7
|
||||
l12.1-20.2c17.8,14.8,37.7,22.4,59.7,22.6c19.4,0,34.9-5.5,46.6-16.5c11.7-11,17.5-25.7,17.5-44.2v-27c-13,24.7-34.9,37.1-65.4,37.1
|
||||
c-23.9,0-43.3-8-58.4-24c-15.1-16-22.6-36.7-22.6-62.1c0-24.7,7.4-45,22.3-60.9c14.8-15.9,34.2-23.9,58-24.1
|
||||
c30.6,0,52.6,12.4,66.1,37.1v-36.1H9610z M9479.2,1049.2c11.4,11.8,25.9,17.7,43.7,17.7s32.3-5.9,43.7-17.7c11.3-11.8,17-26.8,17-45
|
||||
c0-18.4-5.7-33.6-17-45.4c-11.4-11.8-25.9-17.7-43.7-17.7s-32.3,5.9-43.7,17.7c-11.3,11.8-17.1,26.9-17.4,45.4
|
||||
C9462.1,1022.4,9467.9,1037.4,9479.2,1049.2z"/>
|
||||
<path fill="#6D6E71" d="M9729.4,1138.1h-22.9l105.3-317.8h23.3L9729.4,1138.1z"/>
|
||||
</svg>
|
||||
BIN
webapps/ROOT/bg-button.png
Normal file
|
After Width: | Height: | Size: 713 B |
BIN
webapps/ROOT/bg-middle.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
webapps/ROOT/bg-nav.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
webapps/ROOT/bg-upper.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
webapps/ROOT/favicon.ico
Normal file
|
After Width: | Height: | Size: 21 KiB |
220
webapps/ROOT/index.jsp
Normal file
@@ -0,0 +1,220 @@
|
||||
<%--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
--%>
|
||||
<%@ page session="false" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
|
||||
<%
|
||||
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy");
|
||||
request.setAttribute("year", sdf.format(new java.util.Date()));
|
||||
request.setAttribute("tomcatUrl", "https://tomcat.apache.org/");
|
||||
request.setAttribute("tomcatDocUrl", "/docs/");
|
||||
request.setAttribute("tomcatExamplesUrl", "/examples/");
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title><%=request.getServletContext().getServerInfo() %></title>
|
||||
<link href="favicon.ico" rel="icon" type="image/x-icon" />
|
||||
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
||||
<link href="tomcat.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="navigation" class="curved container">
|
||||
<span id="nav-home"><a href="${tomcatUrl}">Home</a></span>
|
||||
<span id="nav-hosts"><a href="${tomcatDocUrl}">Documentation</a></span>
|
||||
<span id="nav-config"><a href="${tomcatDocUrl}config/">Configuration</a></span>
|
||||
<span id="nav-examples"><a href="${tomcatExamplesUrl}">Examples</a></span>
|
||||
<span id="nav-wiki"><a href="https://wiki.apache.org/tomcat/FrontPage">Wiki</a></span>
|
||||
<span id="nav-lists"><a href="${tomcatUrl}lists.html">Mailing Lists</a></span>
|
||||
<span id="nav-help"><a href="${tomcatUrl}findhelp.html">Find Help</a></span>
|
||||
<br class="separator" />
|
||||
</div>
|
||||
<div id="asf-box">
|
||||
<h1>${pageContext.servletContext.serverInfo}</h1>
|
||||
</div>
|
||||
<div id="upper" class="curved container">
|
||||
<div id="congrats" class="curved container">
|
||||
<h2>If you're seeing this, you've successfully installed Tomcat. Congratulations!</h2>
|
||||
</div>
|
||||
<div id="notice">
|
||||
<img src="tomcat.png" alt="[tomcat logo]" />
|
||||
<div id="tasks">
|
||||
<h3>Recommended Reading:</h3>
|
||||
<h4><a href="${tomcatDocUrl}security-howto.html">Security Considerations How-To</a></h4>
|
||||
<h4><a href="${tomcatDocUrl}manager-howto.html">Manager Application How-To</a></h4>
|
||||
<h4><a href="${tomcatDocUrl}cluster-howto.html">Clustering/Session Replication How-To</a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="actions">
|
||||
<div class="button">
|
||||
<a class="container shadow" href="/manager/status"><span>Server Status</span></a>
|
||||
</div>
|
||||
<div class="button">
|
||||
<a class="container shadow" href="/manager/html"><span>Manager App</span></a>
|
||||
</div>
|
||||
<div class="button">
|
||||
<a class="container shadow" href="/host-manager/html"><span>Host Manager</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<br class="separator" />
|
||||
</div>
|
||||
<div id="middle" class="curved container">
|
||||
<h3>Developer Quick Start</h3>
|
||||
<div class="col25">
|
||||
<div class="container">
|
||||
<p><a href="${tomcatDocUrl}setup.html">Tomcat Setup</a></p>
|
||||
<p><a href="${tomcatDocUrl}appdev/">First Web Application</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col25">
|
||||
<div class="container">
|
||||
<p><a href="${tomcatDocUrl}realm-howto.html">Realms & AAA</a></p>
|
||||
<p><a href="${tomcatDocUrl}jndi-datasource-examples-howto.html">JDBC DataSources</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col25">
|
||||
<div class="container">
|
||||
<p><a href="${tomcatExamplesUrl}">Examples</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col25">
|
||||
<div class="container">
|
||||
<p><a href="https://wiki.apache.org/tomcat/Specifications">Servlet Specifications</a></p>
|
||||
<p><a href="https://wiki.apache.org/tomcat/TomcatVersions">Tomcat Versions</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<br class="separator" />
|
||||
</div>
|
||||
<div id="lower">
|
||||
<div id="low-manage" class="">
|
||||
<div class="curved container">
|
||||
<h3>Managing Tomcat</h3>
|
||||
<p>For security, access to the <a href="/manager/html">manager webapp</a> is restricted.
|
||||
Users are defined in:</p>
|
||||
<pre>$CATALINA_HOME/conf/tomcat-users.xml</pre>
|
||||
<p>In Tomcat @VERSION_MAJOR_MINOR@ access to the manager application is split between
|
||||
different users. <a href="${tomcatDocUrl}manager-howto.html">Read more...</a></p>
|
||||
<br />
|
||||
<h4><a href="${tomcatDocUrl}RELEASE-NOTES.txt">Release Notes</a></h4>
|
||||
<h4><a href="${tomcatDocUrl}changelog.html">Changelog</a></h4>
|
||||
<h4><a href="${tomcatUrl}migration.html">Migration Guide</a></h4>
|
||||
<h4><a href="${tomcatUrl}security.html">Security Notices</a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="low-docs" class="">
|
||||
<div class="curved container">
|
||||
<h3>Documentation</h3>
|
||||
<h4><a href="${tomcatDocUrl}">Tomcat @VERSION_MAJOR_MINOR@ Documentation</a></h4>
|
||||
<h4><a href="${tomcatDocUrl}config/">Tomcat @VERSION_MAJOR_MINOR@ Configuration</a></h4>
|
||||
<h4><a href="https://wiki.apache.org/tomcat/FrontPage">Tomcat Wiki</a></h4>
|
||||
<p>Find additional important configuration information in:</p>
|
||||
<pre>$CATALINA_HOME/RUNNING.txt</pre>
|
||||
<p>Developers may be interested in:</p>
|
||||
<ul>
|
||||
<li><a href="https://tomcat.apache.org/bugreport.html">Tomcat @VERSION_MAJOR_MINOR@ Bug Database</a></li>
|
||||
<li><a href="${tomcatDocUrl}api/index.html">Tomcat @VERSION_MAJOR_MINOR@ JavaDocs</a></li>
|
||||
<li><a href="https://github.com/apache/tomcat/tree/@GIT_BRANCH@">Tomcat @VERSION_MAJOR_MINOR@ Git Repository at GitHub</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="low-help" class="">
|
||||
<div class="curved container">
|
||||
<h3>Getting Help</h3>
|
||||
<h4><a href="${tomcatUrl}faq/">FAQ</a> and <a href="${tomcatUrl}lists.html">Mailing Lists</a></h4>
|
||||
<p>The following mailing lists are available:</p>
|
||||
<ul>
|
||||
<li id="list-announce"><strong><a href="${tomcatUrl}lists.html#tomcat-announce">tomcat-announce</a><br />
|
||||
Important announcements, releases, security vulnerability notifications. (Low volume).</strong>
|
||||
</li>
|
||||
<li><a href="${tomcatUrl}lists.html#tomcat-users">tomcat-users</a><br />
|
||||
User support and discussion
|
||||
</li>
|
||||
<li><a href="${tomcatUrl}lists.html#taglibs-user">taglibs-user</a><br />
|
||||
User support and discussion for <a href="${tomcatUrl}taglibs/">Apache Taglibs</a>
|
||||
</li>
|
||||
<li><a href="${tomcatUrl}lists.html#tomcat-dev">tomcat-dev</a><br />
|
||||
Development mailing list, including commit messages
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<br class="separator" />
|
||||
</div>
|
||||
<div id="footer" class="curved container">
|
||||
<div class="col20">
|
||||
<div class="container">
|
||||
<h4>Other Downloads</h4>
|
||||
<ul>
|
||||
<li><a href="${tomcatUrl}download-connectors.cgi">Tomcat Connectors</a></li>
|
||||
<li><a href="${tomcatUrl}download-native.cgi">Tomcat Native</a></li>
|
||||
<li><a href="${tomcatUrl}taglibs/">Taglibs</a></li>
|
||||
<li><a href="${tomcatDocUrl}deployer-howto.html">Deployer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col20">
|
||||
<div class="container">
|
||||
<h4>Other Documentation</h4>
|
||||
<ul>
|
||||
<li><a href="${tomcatUrl}connectors-doc/">Tomcat Connectors</a></li>
|
||||
<li><a href="${tomcatUrl}connectors-doc/">mod_jk Documentation</a></li>
|
||||
<li><a href="${tomcatUrl}native-doc/">Tomcat Native</a></li>
|
||||
<li><a href="${tomcatDocUrl}deployer-howto.html">Deployer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col20">
|
||||
<div class="container">
|
||||
<h4>Get Involved</h4>
|
||||
<ul>
|
||||
<li><a href="${tomcatUrl}getinvolved.html">Overview</a></li>
|
||||
<li><a href="${tomcatUrl}source.html">Source Repositories</a></li>
|
||||
<li><a href="${tomcatUrl}lists.html">Mailing Lists</a></li>
|
||||
<li><a href="https://wiki.apache.org/tomcat/FrontPage">Wiki</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col20">
|
||||
<div class="container">
|
||||
<h4>Miscellaneous</h4>
|
||||
<ul>
|
||||
<li><a href="${tomcatUrl}contact.html">Contact</a></li>
|
||||
<li><a href="${tomcatUrl}legal.html">Legal</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
|
||||
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col20">
|
||||
<div class="container">
|
||||
<h4>Apache Software Foundation</h4>
|
||||
<ul>
|
||||
<li><a href="${tomcatUrl}whoweare.html">Who We Are</a></li>
|
||||
<li><a href="${tomcatUrl}heritage.html">Heritage</a></li>
|
||||
<li><a href="https://www.apache.org">Apache Home</a></li>
|
||||
<li><a href="${tomcatUrl}resources.html">Resources</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<br class="separator" />
|
||||
</div>
|
||||
<p class="copyright">Copyright ©1999-${year} Apache Software Foundation. All Rights Reserved</p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
webapps/ROOT/tomcat-power.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
351
webapps/ROOT/tomcat.css
Normal file
@@ -0,0 +1,351 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
body {
|
||||
margin: 10px 20px;
|
||||
text-align: center;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p, ul, ol {
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
h1 {
|
||||
font-size: 18pt;
|
||||
margin: 0.5em 0 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 16pt;
|
||||
}
|
||||
h3 {
|
||||
font-size: 13pt;
|
||||
}
|
||||
h4 {
|
||||
font-size: 12pt;
|
||||
}
|
||||
h5 {
|
||||
font-size: 11pt;
|
||||
}
|
||||
p {
|
||||
font-size: 11pt
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 0.25em;
|
||||
text-indent: 0;
|
||||
list-style: none;
|
||||
}
|
||||
li {
|
||||
margin: 0;
|
||||
padding: 0 0 0.25em;
|
||||
text-indent: 0;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
pre {
|
||||
text-indent: 0.25em;
|
||||
width: 90%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
br.separator {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 10px;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
.col20 {
|
||||
float: left;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.col25 {
|
||||
float: left;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
min-width: 720px;
|
||||
max-width: 1000px;
|
||||
}
|
||||
.curved {
|
||||
border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
-khtml-border-radius: 10px;
|
||||
}
|
||||
|
||||
#navigation {
|
||||
background: #eee url(bg-nav.png) repeat-x top left;
|
||||
margin: 0 0 10px;
|
||||
padding: 0;
|
||||
}
|
||||
#navigation span {
|
||||
float: left;
|
||||
}
|
||||
#navigation span a {
|
||||
display: block;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
text-shadow: 1px 1px 1px #fff;
|
||||
}
|
||||
#navigation span a:link,
|
||||
#navigation span a:visited,
|
||||
#navigation span a:hover,
|
||||
#navigation span a:active {
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
#navigation span#nav-help {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#asf-box {
|
||||
height: 40px;
|
||||
background: #fff url(asf-logo-wide.svg) no-repeat top right;}
|
||||
#asf-box h1 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#upper {
|
||||
background: #fff url(bg-upper.png) repeat-x top left;
|
||||
}
|
||||
|
||||
#congrats {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
margin: 0 40px 20px;
|
||||
background-color: #9c9;
|
||||
}
|
||||
#congrats h2 {
|
||||
font-size: 14pt;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#notice {
|
||||
float: left;
|
||||
width: 560px;
|
||||
color: #696;
|
||||
}
|
||||
#notice a:link,
|
||||
#notice a:visited,
|
||||
#notice a:hover,
|
||||
#notice a:active {
|
||||
color: #090;
|
||||
text-decoration: none;
|
||||
}
|
||||
#notice img,
|
||||
#notice #tasks {
|
||||
float: left;
|
||||
}
|
||||
#tasks a:link,
|
||||
#tasks a:visited,
|
||||
#tasks a:hover,
|
||||
#tasks a:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#notice img {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
#actions {
|
||||
float: right;
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
#actions .button {
|
||||
display: block;
|
||||
padding: 0;
|
||||
height: 36px;
|
||||
background: url(bg-button.png) no-repeat top left;
|
||||
}
|
||||
|
||||
#actions .button a {
|
||||
display: block;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#actions .button a:link,
|
||||
#actions .button a:visited,
|
||||
#actions .button a:hover,
|
||||
#actions .button a:active {
|
||||
color: #696;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#actions .button a span {
|
||||
display: block;
|
||||
padding: 6px 10px;
|
||||
color: #666;
|
||||
text-shadow: 1px 1px 1px #fff;
|
||||
font-size: 10pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#middle {
|
||||
background: #eef url(bg-middle.png) repeat-x top left;
|
||||
margin: 20px 0;
|
||||
padding: 1px 10px;
|
||||
}
|
||||
#middle h3 {
|
||||
margin: 0 0 10px;
|
||||
color: #033;
|
||||
}
|
||||
#middle p {
|
||||
font-size: 10pt;
|
||||
}
|
||||
#middle a:link,
|
||||
#middle a:visited,
|
||||
#middle a:hover,
|
||||
#middle a:active {
|
||||
color: #366;
|
||||
font-weight: bold;
|
||||
}
|
||||
#middle .col25 .container {
|
||||
padding: 0 0 1px;
|
||||
}
|
||||
|
||||
#developers {
|
||||
float: left;
|
||||
width: 40%;
|
||||
}
|
||||
#security {
|
||||
float: right;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#lower {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#lower a:link,
|
||||
#lower a:visited,
|
||||
#lower a:hover,
|
||||
#lower a:active {
|
||||
color: #600;
|
||||
}
|
||||
|
||||
#lower strong a:link,
|
||||
#lower strong a:visited,
|
||||
#lower strong a:hover,
|
||||
#lower strong a:active {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
#lower h3 {
|
||||
color: #963;
|
||||
font-size: 14pt;
|
||||
}
|
||||
#lower h4 {
|
||||
font-size: 12pt;
|
||||
}
|
||||
#lower ul {
|
||||
padding: 0;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
#lower p,
|
||||
#lower li {
|
||||
font-size: 9pt;
|
||||
color: #753;
|
||||
margin: 0 0 0.1em;
|
||||
}
|
||||
#lower li {
|
||||
padding: 3px 5px;
|
||||
}
|
||||
#lower li strong {
|
||||
color: #a53;
|
||||
}
|
||||
#lower li#list-announce {
|
||||
border: 1px solid #f90;
|
||||
background-color: #ffe8c8;
|
||||
}
|
||||
#lower p {
|
||||
font-size: 10.5pt;
|
||||
}
|
||||
|
||||
#low-manage,
|
||||
#low-docs,
|
||||
#low-help {
|
||||
float: left;
|
||||
width: 32%;
|
||||
}
|
||||
#low-docs {
|
||||
margin: 0 0 0 2.2%;
|
||||
}
|
||||
#low-help {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#low-manage div,
|
||||
#low-docs div,
|
||||
#low-help div {
|
||||
min-height: 280px;
|
||||
border: 3px solid #ffdc75;
|
||||
background-color: #fff1c8;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
padding: 0;
|
||||
margin: 20px 0;
|
||||
color: #999;
|
||||
background-color: #eee;
|
||||
}
|
||||
#footer h4 {
|
||||
margin: 0 0 10px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
#footer p {
|
||||
margin: 0 0 10px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
#footer ul {
|
||||
margin: 6px 0 1px;
|
||||
padding: 0;
|
||||
}
|
||||
#footer li {
|
||||
margin: 0;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
#footer a:link,
|
||||
#footer a:visited,
|
||||
#footer a:hover,
|
||||
#footer a:active {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
font-size: 10pt;
|
||||
color: #666;
|
||||
}
|
||||
BIN
webapps/ROOT/tomcat.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
webapps/ROOT/tomcat.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
967
webapps/ROOT/tomcat.svg
Normal file
|
After Width: | Height: | Size: 66 KiB |
18
webapps/docs/META-INF/context.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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.
|
||||
-->
|
||||
<Context antiResourceLocking="false" />
|
||||
29
webapps/docs/WEB-INF/web.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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.
|
||||
-->
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1"
|
||||
metadata-complete="true">
|
||||
|
||||
<display-name>Tomcat Documentation</display-name>
|
||||
<description>
|
||||
Tomcat Documentation.
|
||||
</description>
|
||||
</web-app>
|
||||
88
webapps/docs/aio.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="aio.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<title>Advanced IO and Tomcat</title>
|
||||
<author>Remy Maucherat</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Introduction">
|
||||
|
||||
<p>
|
||||
<b>IMPORTANT NOTE: Usage of these features requires using the
|
||||
HTTP connectors. The AJP connectors do not support them.</b>
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Asynchronous writes">
|
||||
|
||||
<p>
|
||||
When using HTTP connectors (based on APR or NIO/NIO2),
|
||||
Tomcat supports using sendfile to send large static files.
|
||||
These writes, as soon as the system load increases, will be performed
|
||||
asynchronously in the most efficient way. Instead of sending a large response using
|
||||
blocking writes, it is possible to write content to a static file, and write it
|
||||
using a sendfile code. A caching valve could take advantage of this to cache the
|
||||
response data in a file rather than store it in memory. Sendfile support is
|
||||
available if the request attribute <code>org.apache.tomcat.sendfile.support</code>
|
||||
is set to <code>Boolean.TRUE</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Any servlet can instruct Tomcat to perform a sendfile call by setting the appropriate
|
||||
request attributes. It is also necessary to correctly set the content length
|
||||
for the response. When using sendfile, it is best to ensure that neither the
|
||||
request or response have been wrapped, since as the response body will be sent later
|
||||
by the connector itself, it cannot be filtered. Other than setting the 3 needed
|
||||
request attributes, the servlet should not send any response data, but it may use
|
||||
any method which will result in modifying the response header (like setting cookies).
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><code>org.apache.tomcat.sendfile.filename</code>: Canonical filename of the file which will be sent as
|
||||
a String</li>
|
||||
<li><code>org.apache.tomcat.sendfile.start</code>: Start offset as a Long</li>
|
||||
<li><code>org.apache.tomcat.sendfile.end</code>: End offset as a Long</li>
|
||||
</ul>
|
||||
<p>
|
||||
In addition to setting these parameters it is necessary to set the content-length header.
|
||||
Tomcat will not do that for you, since you may have already written data to the output stream.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Note that the use of sendfile will disable any compression that Tomcat may
|
||||
otherwise have performed on the response.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</document>
|
||||
34
webapps/docs/annotationapi/index.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>API docs</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
The Annotation API Javadoc is not installed by default. Download and install
|
||||
the "fulldocs" package to get it.
|
||||
|
||||
You can also access the javadoc online in the Tomcat
|
||||
<a href="https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/">
|
||||
documentation bundle</a>.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
34
webapps/docs/api/index.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>API docs</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Tomcat's internal javadoc is not installed by default. Download and install
|
||||
the "fulldocs" package to get it.
|
||||
|
||||
You can also access the javadoc online in the Tomcat
|
||||
<a href="https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/">
|
||||
documentation bundle</a>.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
508
webapps/docs/appdev/build.xml.txt
Normal file
249
webapps/docs/appdev/deployment.xml
Normal file
@@ -0,0 +1,249 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="deployment.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="craigmcc@apache.org">Craig R. McClanahan</author>
|
||||
<title>Deployment</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Background">
|
||||
|
||||
<p>Before describing how to organize your source code directories,
|
||||
it is useful to examine the runtime organization of a web application.
|
||||
Prior to the Servlet API Specification, version 2.2, there was little
|
||||
consistency between server platforms. However, servers that conform
|
||||
to the 2.2 (or later) specification are required to accept a
|
||||
<em>Web Application Archive</em> in a standard format, which is discussed
|
||||
further below.</p>
|
||||
|
||||
<p>A web application is defined as a hierarchy of directories and files
|
||||
in a standard layout. Such a hierarchy can be accessed in its "unpacked"
|
||||
form, where each directory and file exists in the filesystem separately,
|
||||
or in a "packed" form known as a Web ARchive, or WAR file. The former format
|
||||
is more useful during development, while the latter is used when you
|
||||
distribute your application to be installed.</p>
|
||||
|
||||
<p>The top-level directory of your web application hierarchy is also the
|
||||
<em>document root</em> of your application. Here, you will place the HTML
|
||||
files and JSP pages that comprise your application's user interface. When the
|
||||
system administrator deploys your application into a particular server, he
|
||||
or she assigns a <em>context path</em> to your application (a later section
|
||||
of this manual describes deployment on Tomcat). Thus, if the
|
||||
system administrator assigns your application to the context path
|
||||
<code>/catalog</code>, then a request URI referring to
|
||||
<code>/catalog/index.html</code> will retrieve the <code>index.html</code>
|
||||
file from your document root.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Standard Directory Layout">
|
||||
|
||||
<p>To facilitate creation of a Web Application Archive file in the required
|
||||
format, it is convenient to arrange the "executable" files of your web
|
||||
application (that is, the files that Tomcat actually uses when executing
|
||||
your app) in the same organization as required by the WAR format itself.
|
||||
To do this, you will end up with the following contents in your
|
||||
application's "document root" directory:</p>
|
||||
<ul>
|
||||
<li><strong>*.html, *.jsp, etc.</strong> - The HTML and JSP pages, along
|
||||
with other files that must be visible to the client browser (such as
|
||||
JavaScript, stylesheet files, and images) for your application.
|
||||
In larger applications you may choose to divide these files into
|
||||
a subdirectory hierarchy, but for smaller apps, it is generally
|
||||
much simpler to maintain only a single directory for these files.
|
||||
<br/><br/></li>
|
||||
<li><strong>/WEB-INF/web.xml</strong> - The <em>Web Application Deployment
|
||||
Descriptor</em> for your application. This is an XML file describing
|
||||
the servlets and other components that make up your application,
|
||||
along with any initialization parameters and container-managed
|
||||
security constraints that you want the server to enforce for you.
|
||||
This file is discussed in more detail in the following subsection.
|
||||
<br/><br/></li>
|
||||
<li><strong>/WEB-INF/classes/</strong> - This directory contains any Java
|
||||
class files (and associated resources) required for your application,
|
||||
including both servlet and non-servlet classes, that are not combined
|
||||
into JAR files. If your classes are organized into Java packages,
|
||||
you must reflect this in the directory hierarchy under
|
||||
<code>/WEB-INF/classes/</code>. For example, a Java class named
|
||||
<code>com.mycompany.mypackage.MyServlet</code>
|
||||
would need to be stored in a file named
|
||||
<code>/WEB-INF/classes/com/mycompany/mypackage/MyServlet.class</code>.
|
||||
<br/><br/></li>
|
||||
<li><strong>/WEB-INF/lib/</strong> - This directory contains JAR files that
|
||||
contain Java class files (and associated resources) required for your
|
||||
application, such as third party class libraries or JDBC drivers.</li>
|
||||
</ul>
|
||||
|
||||
<p>When you install an application into Tomcat (or any other 2.2 or later
|
||||
Servlet container), the classes in the <code>WEB-INF/classes/</code>
|
||||
directory, as well as all classes in JAR files found in the
|
||||
<code>WEB-INF/lib/</code> directory, are made visible to other classes
|
||||
within your particular web application. Thus, if
|
||||
you include all of the required library classes in one of these places (be
|
||||
sure to check licenses for redistribution rights for any third party libraries
|
||||
you utilize), you will simplify the installation of your web application --
|
||||
no adjustment to the system class path (or installation of global library
|
||||
files in your server) will be necessary.</p>
|
||||
|
||||
<p>Much of this information was extracted from Chapter 9 of the Servlet
|
||||
API Specification, version 2.3, which you should consult for more details.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Shared Library Files">
|
||||
|
||||
<p>Like most servlet containers, Tomcat also supports mechanisms to install
|
||||
library JAR files (or unpacked classes) once, and make them visible to all
|
||||
installed web applications (without having to be included inside the web
|
||||
application itself). The details of how Tomcat locates and shares such
|
||||
classes are described in the
|
||||
<a href="../class-loader-howto.html">Class Loader How-To</a> documentation.
|
||||
The location commonly used within a Tomcat installation for shared code is
|
||||
<strong>$CATALINA_HOME/lib</strong>. JAR files placed here are visible both to
|
||||
web applications and internal Tomcat code. This is a good place to put JDBC
|
||||
drivers that are required for both your application or internal Tomcat use
|
||||
(such as for a JDBCRealm).</p>
|
||||
|
||||
<p>Out of the box, a standard Tomcat installation includes a variety
|
||||
of pre-installed shared library files, including:</p>
|
||||
<ul>
|
||||
<li>The <em>Servlet 3.1</em> and <em>JSP 2.3</em> APIs that are fundamental
|
||||
to writing servlets and JavaServer Pages.<br/><br/></li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Web Application Deployment Descriptor">
|
||||
|
||||
<p>As mentioned above, the <code>/WEB-INF/web.xml</code> file contains the
|
||||
Web Application Deployment Descriptor for your application. As the filename
|
||||
extension implies, this file is an XML document, and defines everything about
|
||||
your application that a server needs to know (except the <em>context path</em>,
|
||||
which is assigned by the system administrator when the application is
|
||||
deployed).</p>
|
||||
|
||||
<p>The complete syntax and semantics for the deployment descriptor is defined
|
||||
in Chapter 13 of the Servlet API Specification, version 2.3. Over time, it
|
||||
is expected that development tools will be provided that create and edit the
|
||||
deployment descriptor for you. In the meantime, to provide a starting point,
|
||||
a <a href="web.xml.txt" target="_blank">basic web.xml file</a>
|
||||
is provided. This file includes comments that describe the purpose of each
|
||||
included element.</p>
|
||||
|
||||
<p><strong>NOTE</strong> - The Servlet Specification includes a Document
|
||||
Type Descriptor (DTD) for the web application deployment descriptor, and
|
||||
Tomcat enforces the rules defined here when processing your application's
|
||||
<code>/WEB-INF/web.xml</code> file. In particular, you <strong>must</strong>
|
||||
enter your descriptor elements (such as <code><filter></code>,
|
||||
<code><servlet></code>, and <code><servlet-mapping></code> in
|
||||
the order defined by the DTD (see Section 13.3).</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Tomcat Context Descriptor">
|
||||
|
||||
<p>A /META-INF/context.xml file can be used to define Tomcat specific
|
||||
configuration options, such as an access log, data sources, session manager
|
||||
configuration and more. This XML file must contain one Context element, which
|
||||
will be considered as if it was the child of the Host element corresponding
|
||||
to the Host to which the web application is being deployed. The
|
||||
<a href="../config/context.html">Tomcat configuration documentation</a> contains
|
||||
information on the Context element.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Deployment With Tomcat">
|
||||
|
||||
<p><em>The description below uses the variable name $CATALINA_BASE to refer the
|
||||
base directory against which most relative paths are resolved. If you have
|
||||
not configured Tomcat for multiple instances by setting a CATALINA_BASE
|
||||
directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME,
|
||||
the directory into which you have installed Tomcat.</em></p>
|
||||
|
||||
<p>In order to be executed, a web application must be deployed on
|
||||
a servlet container. This is true even during development.
|
||||
We will describe using Tomcat to provide the execution environment.
|
||||
A web application can be deployed in Tomcat by one of the following
|
||||
approaches:</p>
|
||||
<ul>
|
||||
<li><em>Copy unpacked directory hierarchy into a subdirectory in directory
|
||||
<code>$CATALINA_BASE/webapps/</code></em>. Tomcat will assign a
|
||||
context path to your application based on the subdirectory name you
|
||||
choose. We will use this technique in the <code>build.xml</code>
|
||||
file that we construct, because it is the quickest and easiest approach
|
||||
during development. Be sure to restart Tomcat after installing or
|
||||
updating your application.
|
||||
<br/><br/></li>
|
||||
<li><em>Copy the web application archive file into directory
|
||||
<code>$CATALINA_BASE/webapps/</code></em>. When Tomcat is started, it will
|
||||
automatically expand the web application archive file into its unpacked
|
||||
form, and execute the application that way. This approach would typically
|
||||
be used to install an additional application, provided by a third party
|
||||
vendor or by your internal development staff, into an existing
|
||||
Tomcat installation. <strong>NOTE</strong> - If you use this approach,
|
||||
and wish to update your application later, you must both replace the
|
||||
web application archive file <strong>AND</strong> delete the expanded
|
||||
directory that Tomcat created, and then restart Tomcat, in order to reflect
|
||||
your changes.
|
||||
<br/><br/></li>
|
||||
<li><em>Use the Tomcat "Manager" web application to deploy and undeploy
|
||||
web applications</em>. Tomcat includes a web application, deployed
|
||||
by default on context path <code>/manager</code>, that allows you to
|
||||
deploy and undeploy applications on a running Tomcat server without
|
||||
restarting it. See <a href="../manager-howto.html">Manager App How-To</a>
|
||||
for more information on using the Manager web application.<br/><br/></li>
|
||||
<li><em>Use "Manager" Ant Tasks In Your Build Script</em>. Tomcat
|
||||
includes a set of custom task definitions for the <code>Ant</code>
|
||||
build tool that allow you to automate the execution of commands to the
|
||||
"Manager" web application. These tasks are used in the Tomcat deployer.
|
||||
<br/><br/></li>
|
||||
<li><em>Use the Tomcat Deployer</em>. Tomcat includes a packaged tool
|
||||
bundling the Ant tasks, and can be used to automatically precompile JSPs
|
||||
which are part of the web application before deployment to the server.
|
||||
<br/><br/></li>
|
||||
</ul>
|
||||
|
||||
<p>Deploying your app on other servlet containers will be specific to each
|
||||
container, but all containers compatible with the Servlet API Specification
|
||||
(version 2.2 or later) are required to accept a web application archive file.
|
||||
Note that other containers are <strong>NOT</strong> required to accept an
|
||||
unpacked directory structure (as Tomcat does), or to provide mechanisms for
|
||||
shared library files, but these features are commonly available.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
79
webapps/docs/appdev/index.xml
Normal file
@@ -0,0 +1,79 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="index.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="craigmcc@apache.org">Craig R. McClanahan</author>
|
||||
<title>Table of Contents</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<section name="Preface">
|
||||
|
||||
<p>This manual includes contributions from many members of the Tomcat Project
|
||||
developer community. The following authors have provided significant content:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Craig R. McClanahan
|
||||
(<a href="mailto:craigmcc@apache.org">craigmcc@apache.org</a>)</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Table of Contents">
|
||||
|
||||
<p>The information presented is divided into the following sections:</p>
|
||||
<ul>
|
||||
<li><a href="introduction.html"><strong>Introduction</strong></a> -
|
||||
Briefly describes the information covered here, with
|
||||
links and references to other sources of information.</li>
|
||||
<li><a href="installation.html"><strong>Installation</strong></a> -
|
||||
Covers acquiring and installing the required software
|
||||
components to use Tomcat for web application development.</li>
|
||||
<li><a href="deployment.html"><strong>Deployment Organization</strong></a> -
|
||||
Discusses the standard directory layout for a web application
|
||||
(defined in the Servlet API Specification), the Web Application
|
||||
Deployment Descriptor, and options for integration with Tomcat
|
||||
in your development environment.</li>
|
||||
<li><a href="source.html"><strong>Source Organization</strong></a> -
|
||||
Describes a useful approach to organizing the source code
|
||||
directories for your project, and introduces the
|
||||
<code>build.xml</code> used by Ant to manage compilation.</li>
|
||||
<li><a href="processes.html"><strong>Development Processes</strong></a> -
|
||||
Provides brief descriptions of typical development processes
|
||||
utilizing the recommended deployment and source organizations.</li>
|
||||
<li><a href="sample/" target="_blank"><strong>Example Application</strong></a> -
|
||||
This directory contains a very simple, but functionally complete,
|
||||
"Hello, World" application built according to the principles
|
||||
described in this manual. You can use this application to
|
||||
practice using the described techniques.</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
105
webapps/docs/appdev/installation.xml
Normal file
@@ -0,0 +1,105 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="installation.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="craigmcc@apache.org">Craig R. McClanahan</author>
|
||||
<author email="yoavs@apache.org">Yoav Shapira</author>
|
||||
<title>Installation</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<section name="Installation">
|
||||
|
||||
<p>In order to use Tomcat for developing web applications, you must first
|
||||
install it (and the software it depends on). The required steps are outlined
|
||||
in the following subsections.</p>
|
||||
|
||||
<subsection name="JDK">
|
||||
|
||||
<p>Tomcat <version-major-minor/> was designed to run on Java <min-java-version/> or later.
|
||||
</p>
|
||||
|
||||
<p>Compatible JDKs for many platforms (or links to where they can be found)
|
||||
are available at
|
||||
<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a>.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
<subsection name="Tomcat">
|
||||
|
||||
<p>Binary downloads of the <strong>Tomcat</strong> server are available from
|
||||
<a href="https://tomcat.apache.org/">https://tomcat.apache.org/</a>.
|
||||
This manual assumes you are using the most recent release
|
||||
of Tomcat <version-major/>. Detailed instructions for downloading and installing
|
||||
Tomcat are available <a href="../setup.html">here</a>.</p>
|
||||
|
||||
<p>In the remainder of this manual, example shell scripts assume that you have
|
||||
set an environment variable <code>CATALINA_HOME</code> that contains the
|
||||
pathname to the directory in which Tomcat has been installed. Optionally, if
|
||||
Tomcat has been configured for multiple instances, each instance will have its
|
||||
own <code>CATALINA_BASE</code> configured.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
<subsection name="Ant">
|
||||
|
||||
<p>Binary downloads of the <strong>Ant</strong> build tool are available from
|
||||
<a href="https://ant.apache.org/">https://ant.apache.org/</a>.
|
||||
This manual assumes you are using Ant 1.8 or later. The instructions may
|
||||
also be compatible with other versions, but this has not been tested.</p>
|
||||
|
||||
<p>Download and install Ant.
|
||||
Then, add the <code>bin</code> directory of the Ant distribution to your
|
||||
<code>PATH</code> environment variable, following the standard practices for
|
||||
your operating system platform. Once you have done this, you will be able to
|
||||
execute the <code>ant</code> shell command directly.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
<subsection name="CVS">
|
||||
|
||||
<p>Besides the required tools described above, you are strongly encouraged
|
||||
to download and install a <em>source code control</em> system, such as the
|
||||
<strong>Concurrent Version System</strong> (CVS), to maintain historical
|
||||
versions of the source files that make up your web application. Besides
|
||||
the server, you will also need appropriate client
|
||||
tools to check out source code files, and check in modified versions.</p>
|
||||
|
||||
<p>Detailed instructions for installing and using source code control
|
||||
applications is beyond the scope of this manual. However, CVS server and
|
||||
client tools for many platforms (along with documentation) can be downloaded
|
||||
from <a href="http://www.cvshome.org/">http://www.cvshome.org/</a>.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
92
webapps/docs/appdev/introduction.xml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="introduction.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="craigmcc@apache.org">Craig R. McClanahan</author>
|
||||
<title>Introduction</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<section name="Overview">
|
||||
|
||||
<p>Congratulations! You've decided to (or been told to) learn how to
|
||||
build web applications using servlets and JSP pages, and picked the
|
||||
Tomcat server to use for your learning and development. But now what
|
||||
do you do?</p>
|
||||
|
||||
<p>This manual is a primer covering the basic steps of using Tomcat to
|
||||
set up a development environment, organize your source code, and then
|
||||
build and test your application. It does not discuss architectures or
|
||||
recommended coding practices for web application development,
|
||||
or provide in depth instructions on operating the development
|
||||
tools that are discussed. References to sources of additional information
|
||||
are included in the following subsections.</p>
|
||||
|
||||
<p>The discussion in this manual is aimed at developers who will be using
|
||||
a text editor along with command line tools to develop and debug their
|
||||
applications. As such, the recommendations are fairly generic – but you
|
||||
should easily be able to apply them in either a Windows-based or Unix-based
|
||||
development environment. If you are utilizing an Integrated Development
|
||||
Environment (IDE) tool, you will need to adapt the advice given here to
|
||||
the details of your particular environment.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Links">
|
||||
|
||||
<p>The following links provide access to selected sources of online
|
||||
information, documentation, and software that is useful in developing
|
||||
web applications with Tomcat.</p>
|
||||
<ul>
|
||||
<li><p><a href="https://jcp.org/aboutJava/communityprocess/mrel/jsr245/index2.html">https://jcp.org/aboutJava/communityprocess/mrel/jsr245/index2.html</a> -
|
||||
<i>JavaServer Pages (JSP) Specification, Version 2.3</i>. Describes
|
||||
the programming environment provided by standard implementations
|
||||
of the JavaServer Pages (JSP) technology. In conjunction with
|
||||
the Servlet API Specification (see below), this document describes
|
||||
what a portable API page is allowed to contain. Specific
|
||||
information on scripting (Chapter 9), tag extensions (Chapter 7),
|
||||
and packaging JSP pages (Appendix A) is useful. The Javadoc
|
||||
API Documentation is included in the specification, and with the
|
||||
Tomcat download.</p></li>
|
||||
<li><p><a href="http://jcp.org/aboutJava/communityprocess/final/jsr340/index.html">http://jcp.org/aboutJava/communityprocess/final/jsr340/index.html</a> -
|
||||
<i>Servlet API Specification, Version 3.1</i>. Describes the
|
||||
programming environment that must be provided by all servlet
|
||||
containers conforming to this specification. In particular, you
|
||||
will need this document to understand the web application
|
||||
directory structure and deployment file (Chapter 10), methods of
|
||||
mapping request URIs to servlets (Chapter 12), container managed
|
||||
security (Chapter 13), and the syntax of the <code>web.xml</code>
|
||||
Web Application Deployment Descriptor (Chapter 14). The Javadoc
|
||||
API Documentation is included in the specification, and with the
|
||||
Tomcat download.</p></li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
304
webapps/docs/appdev/processes.xml
Normal file
@@ -0,0 +1,304 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="processes.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="craigmcc@apache.org">Craig R. McClanahan</author>
|
||||
<title>Development Processes</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Development Processes">
|
||||
|
||||
<p>Although application development can take many forms, this manual proposes
|
||||
a fairly generic process for creating web applications using Tomcat. The
|
||||
following sections highlight the commands and tasks that you, as the developer
|
||||
of the code, will perform. The same basic approach works when you have
|
||||
multiple programmers involved, as long as you have an appropriate source code
|
||||
control system and internal team rules about who is working on what parts
|
||||
of the application at any given time.</p>
|
||||
|
||||
<p>The task descriptions below assume that you will be using CVS for source
|
||||
code control, and that you have already configured access to the appropriate
|
||||
CVS repository. Instructions for doing this are beyond the scope of this
|
||||
manual. If you are using a different source code control environment, you
|
||||
will need to figure out the corresponding commands for your system.</p>
|
||||
|
||||
|
||||
<subsection name="One-Time Setup of Ant and Tomcat for Development">
|
||||
|
||||
<p>In order to take advantage of the special Ant tasks that interact with the
|
||||
<em>Manager</em> web application, you need to perform the following tasks
|
||||
once (no matter how many web applications you plan to develop).</p>
|
||||
<ul>
|
||||
<li><p><em>Configure the Ant custom tasks</em>. The implementation code for the
|
||||
Ant custom tasks is in a JAR file named
|
||||
<code>$CATALINA_HOME/lib/catalina-ant.jar</code>, which must be
|
||||
copied in to the <code>lib</code> directory of your Ant installation.
|
||||
</p></li>
|
||||
<li><p><em>Define one or more Tomcat users</em>. The <em>Manager</em> web
|
||||
application runs under a security constraint that requires a user to be
|
||||
logged in, and have the security role <code>manager-script</code> assigned
|
||||
to him or her. How such users are defined depends on which Realm you have
|
||||
configured in Tomcat's <code>conf/server.xml</code> file -- see the
|
||||
<a href="../realm-howto.html">Realm Configuration How-To</a> for more
|
||||
information. You may define any number of users (with any username
|
||||
and password that you like) with the <code>manager-script</code> role.
|
||||
</p></li>
|
||||
</ul>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
<subsection name="Create Project Source Code Directory">
|
||||
|
||||
<p>The first step is to create a new project source directory, and customize
|
||||
the <code>build.xml</code> and <code>build.properties</code> files you will
|
||||
be using. The directory structure is described in <a href="source.html">the
|
||||
previous section</a>, or you can use the
|
||||
<a href="sample/">sample application</a> as a starting point.</p>
|
||||
|
||||
<p>Create your project source directory, and define it within your CVS
|
||||
repository. This might be done by a series of commands like this, where
|
||||
<code>{project}</code> is the name under which your project should be
|
||||
stored in the CVS repository, and {username} is your login username:</p>
|
||||
<source><![CDATA[cd {my home directory}
|
||||
mkdir myapp <-- Assumed "project source directory"
|
||||
cd myapp
|
||||
mkdir docs
|
||||
mkdir src
|
||||
mkdir web
|
||||
mkdir web/WEB-INF
|
||||
cvs import -m "Initial Project Creation" {project} \
|
||||
{username} start]]></source>
|
||||
|
||||
<p>Now, to verify that it was created correctly in CVS, we will perform a
|
||||
checkout of the new project:</p>
|
||||
<source><![CDATA[cd ..
|
||||
mv myapp myapp.bu
|
||||
cvs checkout {project}]]></source>
|
||||
|
||||
<p>Next, you will need to create and check in an initial version of the
|
||||
<code>build.xml</code> script to be used for development. For getting
|
||||
started quickly and easily, base your <code>build.xml</code> on the
|
||||
<a href="build.xml.txt">basic build.xml file</a>, included with this manual,
|
||||
or code it from scratch.</p>
|
||||
<source><![CDATA[cd {my home directory}
|
||||
cd myapp
|
||||
emacs build.xml <-- if you want a real editor :-)
|
||||
cvs add build.xml
|
||||
cvs commit]]></source>
|
||||
|
||||
<p>Until you perform the CVS commit, your changes are local to your own
|
||||
development directory. Committing makes those changes visible to other
|
||||
developers on your team that are sharing the same CVS repository.</p>
|
||||
|
||||
<p>The next step is to customize the Ant <em>properties</em> that are
|
||||
named in the <code>build.xml</code> script. This is done by creating a
|
||||
file named <code>build.properties</code> in your project's top-level
|
||||
directory. The supported properties are listed in the comments inside
|
||||
the sample <code>build.xml</code> script. At a minimum, you will generally
|
||||
need to define the <code>catalina.home</code> property defining where
|
||||
Tomcat is installed, and the manager application username and password.
|
||||
You might end up with something like this:</p>
|
||||
<source># Context path to install this application on
|
||||
app.path=/hello
|
||||
|
||||
# Tomcat installation directory
|
||||
catalina.home=/usr/local/apache-tomcat-<version-major-minor/>
|
||||
|
||||
# Manager webapp username and password
|
||||
manager.username=myusername
|
||||
manager.password=mypassword</source>
|
||||
|
||||
<p>In general, you will <strong>not</strong> want to check the
|
||||
<code>build.properties</code> file in to the CVS repository, because it
|
||||
is unique to each developer's environment.</p>
|
||||
|
||||
<p>Now, create the initial version of the web application deployment
|
||||
descriptor. You can base <code>web.xml</code> on the
|
||||
<a href="web.xml.txt">basic web.xml file</a>, or code it from scratch.</p>
|
||||
<source><![CDATA[cd {my home directory}
|
||||
cd myapp/web/WEB-INF
|
||||
emacs web.xml
|
||||
cvs add web.xml
|
||||
cvs commit]]></source>
|
||||
|
||||
Note that this is only an example web.xml file. The full definition
|
||||
of the deployment descriptor file is in the
|
||||
<a href="https://wiki.apache.org/tomcat/Specifications">Servlet Specification.</a>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
<subsection name="Edit Source Code and Pages">
|
||||
|
||||
<p>The edit/build/test tasks will generally be your most common activities
|
||||
during development and maintenance. The following general principles apply.
|
||||
As described in <a href="source.html">Source Organization</a>, newly created
|
||||
source files should be located in the appropriate subdirectory, under your
|
||||
project source directory.</p>
|
||||
|
||||
<p>Whenever you wish to refresh your development directory to reflect the
|
||||
work performed by other developers, you will ask CVS to do it for you:</p>
|
||||
<source><![CDATA[cd {my home directory}
|
||||
cd myapp
|
||||
cvs update -dP]]></source>
|
||||
|
||||
<p>To create a new file, go to the appropriate directory, create the file,
|
||||
and register it with CVS. When you are satisfied with it's contents (after
|
||||
building and testing is successful), commit the new file to the repository.
|
||||
For example, to create a new JSP page:</p>
|
||||
<source><![CDATA[cd {my home directory}
|
||||
cd myapp/web <-- Ultimate destination is document root
|
||||
emacs mypage.jsp
|
||||
cvs add mypage.jsp
|
||||
... build and test the application ...
|
||||
cvs commit]]></source>
|
||||
|
||||
<p>Java source code that is defined in packages must be organized in a
|
||||
directory hierarchy (under the <strong>src/</strong> subdirectory) that
|
||||
matches the package names. For example, a Java class named
|
||||
<code>com.mycompany.mypackage.MyClass.java</code> should be stored in file
|
||||
<code>src/com/mycompany/mypackage/MyClass.java</code>.
|
||||
Whenever you create a new subdirectory, don't forget to
|
||||
register it with CVS.</p>
|
||||
|
||||
<p>To edit an existing source file, you will generally just start editing
|
||||
and testing, then commit the changed file when everything works. Although
|
||||
CVS can be configured to required you to "check out" or "lock" a file you
|
||||
are going to be modifying, this is generally not used.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
<subsection name="Build the Web Application">
|
||||
|
||||
<p>When you are ready to compile the application, issue the following
|
||||
commands (generally, you will want a shell window open that is set to
|
||||
the project source directory, so that only the last command is needed):</p>
|
||||
<source><![CDATA[cd {my home directory}
|
||||
cd myapp <-- Normally leave a window open here
|
||||
ant]]></source>
|
||||
|
||||
<p>The Ant tool will be execute the default "compile" target in your
|
||||
<code>build.xml</code> file, which will compile any new or updated Java
|
||||
code. If this is the first time you compile after a "build clean",
|
||||
it will cause everything to be recompiled.</p>
|
||||
|
||||
<p>To force the recompilation of your entire application, do this instead:</p>
|
||||
<source><![CDATA[cd {my home directory}
|
||||
cd myapp
|
||||
ant all]]></source>
|
||||
|
||||
<p>This is a very good habit immediately before checking in changes, to
|
||||
make sure that you have not introduced any subtle problems that Javac's
|
||||
conditional checking did not catch.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
<subsection name="Test Your Web Application">
|
||||
|
||||
<p>To test your application, you will want to install it under Tomcat. The
|
||||
quickest way to do that is to use the custom Ant tasks that are included in
|
||||
the sample <code>build.xml</code> script. Using these commands might follow
|
||||
a pattern like this:</p>
|
||||
<ul>
|
||||
<li><p><em>Start Tomcat if needed</em>. If Tomcat is not already running,
|
||||
you will need to start it in the usual way.
|
||||
</p></li>
|
||||
<li><p><em>Compile your application</em>. Use the <code>ant compile</code>
|
||||
command (or just <code>ant</code>, since this is the default). Make
|
||||
sure that there are no compilation errors.
|
||||
</p></li>
|
||||
<li><p><em>Install the application</em>. Use the <code>ant install</code>
|
||||
command. This tells Tomcat to immediately start running your app on
|
||||
the context path defined in the <code>app.path</code> build property.
|
||||
Tomcat does <strong>NOT</strong> have to be restarted for this to
|
||||
take effect.
|
||||
</p></li>
|
||||
<li><p><em>Test the application</em>. Using your browser or other testing
|
||||
tools, test the functionality of your application.
|
||||
</p></li>
|
||||
<li><p><em>Modify and rebuild as needed</em>. As you discover that changes
|
||||
are required, make those changes in the original <strong>source</strong>
|
||||
files, not in the output build directory, and re-issue the
|
||||
<code>ant compile</code> command. This ensures that your changes will
|
||||
be available to be saved (via <code>cvs commit</code>) later on --
|
||||
the output build directory is deleted and recreated as necessary.
|
||||
</p></li>
|
||||
<li><p><em>Reload the application</em>. Tomcat will recognize changes in
|
||||
JSP pages automatically, but it will continue to use the old versions
|
||||
of any servlet or JavaBean classes until the application is reloaded.
|
||||
You can trigger this by executing the <code>ant reload</code> command.
|
||||
</p></li>
|
||||
<li><p><em>Remove the application when you are done</em>. When you are through
|
||||
working on this application, you can remove it from live execution by
|
||||
running the <code>ant remove</code> command.
|
||||
</p></li>
|
||||
</ul>
|
||||
|
||||
<p>Do not forget to commit your changes to the source code repository when
|
||||
you have completed your testing!</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
<subsection name="Creating a Release">
|
||||
|
||||
<p>When you are through adding new functionality, and you've tested everything
|
||||
(you DO test, don't you :-), it is time to create the distributable version
|
||||
of your web application that can be deployed on the production server. The
|
||||
following general steps are required:</p>
|
||||
<ul>
|
||||
<li><p>Issue the command <code>ant all</code> from the project source
|
||||
directory, to rebuild everything from scratch one last time.
|
||||
</p></li>
|
||||
<li><p>Use the <code>cvs tag</code> command to create an identifier for
|
||||
all of the source files utilized to create this release. This allows
|
||||
you to reliably reconstruct a release (from sources) at a later
|
||||
time.
|
||||
</p></li>
|
||||
<li><p>Issue the command <code>ant dist</code> to create a distributable
|
||||
web application archive (WAR) file, as well as a JAR file containing
|
||||
the corresponding source code.
|
||||
</p></li>
|
||||
<li><p>Package the contents of the <code>dist</code> directory using the
|
||||
<strong>tar</strong> or <strong>zip</strong> utility, according to
|
||||
the standard release procedures used by your organization.
|
||||
</p></li>
|
||||
</ul>
|
||||
|
||||
</subsection>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</document>
|
||||
48
webapps/docs/appdev/project.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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.
|
||||
-->
|
||||
<project name="Application Developer's Guide"
|
||||
href="https://tomcat.apache.org/">
|
||||
|
||||
<title>Application Developer's Guide</title>
|
||||
|
||||
<logo href="/images/tomcat.gif">
|
||||
The Apache Tomcat Servlet/JSP Container
|
||||
</logo>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<menu name="Links">
|
||||
<item name="Docs Home" href="../index.html"/>
|
||||
<item name="App Dev Guide Home" href="index.html"/>
|
||||
<item name="FAQ" href="https://wiki.apache.org/tomcat/FAQ" />
|
||||
<item name="User Comments" href="#comments_section"/>
|
||||
</menu>
|
||||
|
||||
<menu name="Contents">
|
||||
<item name="Contents" href="index.html"/>
|
||||
<item name="Introduction" href="introduction.html"/>
|
||||
<item name="Installation" href="installation.html"/>
|
||||
<item name="Deployment" href="deployment.html"/>
|
||||
<item name="Source Code" href="source.html"/>
|
||||
<item name="Processes" href="processes.html"/>
|
||||
<item name="Example App" href="sample/"/>
|
||||
</menu>
|
||||
|
||||
</body>
|
||||
</project>
|
||||
17
webapps/docs/appdev/sample/docs/README.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
This is a dummy README file for the sample
|
||||
web application.
|
||||
55
webapps/docs/appdev/sample/index.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="author" content="Ben Souther" />
|
||||
<title>Sample Application</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Sample Application</h2>
|
||||
<p>
|
||||
The example app has been packaged as a war file and can be downloaded
|
||||
<a href="sample.war">here</a> (Note: make sure your browser doesn't
|
||||
change file extension or append a new one).
|
||||
</p>
|
||||
<p>
|
||||
The easiest way to run this application is simply to move the war file
|
||||
to your <b>CATALINA_BASE/webapps</b> directory. A default Tomcat install
|
||||
will automatically expand and deploy the application for you. You can
|
||||
view it with the following URL (assuming that you're running tomcat on
|
||||
port 8080 which is the default):
|
||||
<br />
|
||||
<a href="http://localhost:8080/sample">http://localhost:8080/sample</a>
|
||||
</p>
|
||||
<p>
|
||||
If you just want to browse the contents, you can unpack the war file
|
||||
with the <b>jar</b> command.
|
||||
</p>
|
||||
<pre>
|
||||
jar -xvf sample.war
|
||||
</pre>
|
||||
<p>
|
||||
Note: <b>CATALINA_BASE</b> is usually the directory in which you
|
||||
unpacked the Tomcat distribution. For more information on
|
||||
<b>CATALINA_HOME</b>, <b>CATALINA_BASE</b> and the difference between
|
||||
them see <b>RUNNING.txt</b> in the directory you unpacked your Tomcat
|
||||
distribution.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
BIN
webapps/docs/appdev/sample/sample.war
Normal file
83
webapps/docs/appdev/sample/src/mypackage/Hello.java
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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 mypackage;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
||||
/**
|
||||
* Simple servlet to validate that the Hello, World example can
|
||||
* execute servlets. In the web application deployment descriptor,
|
||||
* this servlet must be mapped to correspond to the link in the
|
||||
* "index.html" file.
|
||||
*
|
||||
* @author Craig R. McClanahan <Craig.McClanahan@eng.sun.com>
|
||||
*/
|
||||
|
||||
public final class Hello extends HttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Respond to a GET request for the content produced by
|
||||
* this servlet.
|
||||
*
|
||||
* @param request The servlet request we are processing
|
||||
* @param response The servlet response we are producing
|
||||
*
|
||||
* @exception IOException if an input/output error occurs
|
||||
* @exception ServletException if a servlet error occurs
|
||||
*/
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request,
|
||||
HttpServletResponse response)
|
||||
throws IOException, ServletException {
|
||||
|
||||
response.setContentType("text/html");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
try (PrintWriter writer = response.getWriter()) {
|
||||
|
||||
writer.println("<!DOCTYPE html><html>");
|
||||
writer.println("<head>");
|
||||
writer.println("<meta charset=\"UTF-8\" />");
|
||||
writer.println("<title>Sample Application Servlet Page</title>");
|
||||
writer.println("</head>");
|
||||
writer.println("<body>");
|
||||
|
||||
|
||||
writer.println("<div style=\"float: left; padding: 10px;\">");
|
||||
writer.println("<img src=\"images/tomcat.gif\" alt=\"\" />");
|
||||
writer.println("</div>");
|
||||
writer.println("<h1>Sample Application Servlet</h1>");
|
||||
writer.println("<p>");
|
||||
writer.println("This is the output of a servlet that is part of");
|
||||
writer.println("the Hello, World application.");
|
||||
writer.println("</p>");
|
||||
|
||||
writer.println("</body>");
|
||||
writer.println("</html>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
40
webapps/docs/appdev/sample/web/WEB-INF/web.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?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.
|
||||
-->
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1">
|
||||
|
||||
<display-name>Hello, World Application</display-name>
|
||||
<description>
|
||||
This is a simple web application with a source code organization
|
||||
based on the recommendations of the Application Developer's Guide.
|
||||
</description>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>HelloServlet</servlet-name>
|
||||
<servlet-class>mypackage.Hello</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>HelloServlet</servlet-name>
|
||||
<url-pattern>/hello</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
37
webapps/docs/appdev/sample/web/hello.jsp
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.
|
||||
--%>
|
||||
<%@ page session="false" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Sample Application JSP Page</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="float: left; padding: 10px;">
|
||||
<img src="images/tomcat.gif" alt="" />
|
||||
</div>
|
||||
<h1>Sample Application JSP Page</h1>
|
||||
This is the output of a JSP page that is part of the Hello, World
|
||||
application.
|
||||
|
||||
|
||||
<%= new String("Hello!") %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
webapps/docs/appdev/sample/web/images/tomcat.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
39
webapps/docs/appdev/sample/web/index.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html><!--
|
||||
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.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Sample "Hello, World" Application</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="float: left; padding: 10px;">
|
||||
<img src="images/tomcat.gif" alt="" />
|
||||
</div>
|
||||
<h1>Sample "Hello, World" Application</h1>
|
||||
<p>This is the home page for a sample application used to illustrate the
|
||||
source directory organization of a web application utilizing the principles
|
||||
outlined in the Application Developer's Guide.
|
||||
|
||||
<p>To prove that they work, you can execute either of the following links:</p>
|
||||
<ul>
|
||||
<li>To a <a href="hello.jsp">JSP page</a>.</li>
|
||||
<li>To a <a href="hello">servlet</a>.</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
317
webapps/docs/appdev/source.xml
Normal file
@@ -0,0 +1,317 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="source.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="craigmcc@apache.org">Craig R. McClanahan</author>
|
||||
<title>Source Organization</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Directory Structure">
|
||||
|
||||
<p><em>The description below uses the variable name $CATALINA_BASE to refer the
|
||||
base directory against which most relative paths are resolved. If you have
|
||||
not configured Tomcat for multiple instances by setting a CATALINA_BASE
|
||||
directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME,
|
||||
the directory into which you have installed Tomcat.</em></p>
|
||||
|
||||
<p>A key recommendation of this manual is to separate the directory
|
||||
hierarchy containing your source code (described in this section) from
|
||||
the directory hierarchy containing your deployable application
|
||||
(described in the preceding section). Maintaining this separation has
|
||||
the following advantages:</p>
|
||||
<ul>
|
||||
<li><p>The contents of the source directories can be more easily administered,
|
||||
moved, and backed up if the "executable" version of the application
|
||||
is not intermixed.
|
||||
</p></li>
|
||||
<li><p>Source code control is easier to manage on directories that contain
|
||||
only source files.
|
||||
</p></li>
|
||||
<li><p>The files that make up an installable distribution of your
|
||||
application are much easier to select when the deployment
|
||||
hierarchy is separate.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>As we will see, the <code>ant</code> development tool makes the creation
|
||||
and processing of such directory hierarchies nearly painless.</p>
|
||||
|
||||
<p>The actual directory and file hierarchy used to contain the source code
|
||||
of an application can be pretty much anything you like. However, the
|
||||
following organization has proven to be quite generally applicable, and is
|
||||
expected by the example <code>build.xml</code> configuration file that
|
||||
is discussed below. All of these components exist under a top level
|
||||
<em>project source directory</em> for your application:</p>
|
||||
<ul>
|
||||
<li><strong>docs/</strong> - Documentation for your application, in whatever
|
||||
format your development team is using.<br/><br/></li>
|
||||
<li><strong>src/</strong> - Java source files that generate the servlets,
|
||||
beans, and other Java classes that are unique to your application.
|
||||
If your source code is organized in packages (<strong>highly</strong>
|
||||
recommended), the package hierarchy should be reflected as a directory
|
||||
structure underneath this directory.<br/><br/></li>
|
||||
<li><strong>web/</strong> - The static content of your web site (HTML pages,
|
||||
JSP pages, JavaScript files, CSS stylesheet files, and images) that will
|
||||
be accessible to application clients. This directory will be the
|
||||
<em>document root</em> of your web application, and any subdirectory
|
||||
structure found here will be reflected in the request URIs required to
|
||||
access those files.<br/><br/></li>
|
||||
<li><strong>web/WEB-INF/</strong> - The special configuration files required
|
||||
for your application, including the web application deployment descriptor
|
||||
(<code>web.xml</code>, defined in the
|
||||
<a href="https://wiki.apache.org/tomcat/Specifications">Servlet Specification</a>),
|
||||
tag library descriptors for custom tag libraries
|
||||
you have created, and other resource files you wish to include within
|
||||
your web application. Even though this directory appears to be a
|
||||
subdirectory of your <em>document root</em>, the Servlet Specification
|
||||
prohibits serving the contents of this directory (or any file it contains)
|
||||
directly to a client request. Therefore, this is a good place to store
|
||||
configuration information that is sensitive (such as database connection
|
||||
usernames and passwords), but is required for your application to
|
||||
operate successfully.</li>
|
||||
</ul>
|
||||
|
||||
<p>During the development process, two additional directories will be
|
||||
created on a temporary basis:</p>
|
||||
<ul>
|
||||
<li><strong>build/</strong> - When you execute a default build
|
||||
(<code>ant</code>), this directory will contain an exact image
|
||||
of the files in the web application archive for this application.
|
||||
Tomcat allows you to deploy an application in an unpacked
|
||||
directory like this, either by copying it to the
|
||||
<code>$CATALINA_BASE/webapps</code> directory, or by <em>installing</em>
|
||||
it via the "Manager" web application. The latter approach is very
|
||||
useful during development, and will be illustrated below.
|
||||
<br/><br/></li>
|
||||
<li><strong>dist/</strong> - When you execute the <code>ant dist</code>
|
||||
target, this directory will be created. It will create an exact image
|
||||
of the binary distribution for your web application, including an license
|
||||
information, documentation, and README files that you have prepared.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note that these two directories should <strong>NOT</strong> be archived in
|
||||
your source code control system, because they are deleted and recreated (from
|
||||
scratch) as needed during development. For that reason, you should not edit
|
||||
any source files in these directories if you want to maintain a permanent
|
||||
record of the changes, because the changes will be lost the next time that a
|
||||
build is performed.</p>
|
||||
|
||||
<subsection name="External Dependencies">
|
||||
|
||||
<p>What do you do if your application requires JAR files (or other
|
||||
resources) from external projects or packages? A common example is that
|
||||
you need to include a JDBC driver in your web application, in order to
|
||||
operate.</p>
|
||||
|
||||
<p>Different developers take different approaches to this problem.
|
||||
Some will encourage checking a copy of the JAR files you depend on into
|
||||
the source code control archives for every application that requires those
|
||||
JAR files. However, this can cause significant management issues when you
|
||||
use the same JAR in many applications - particular when faced with a need
|
||||
to upgrade to a different version of that JAR file.</p>
|
||||
|
||||
<p>Therefore, this manual recommends that you <strong>NOT</strong> store
|
||||
a copy of the packages you depend on inside the source control archives
|
||||
of your applications. Instead, the external dependencies should be
|
||||
integrated as part of the process of <strong>building</strong> your
|
||||
application. In that way, you can always pick up the appropriate version
|
||||
of the JAR files from wherever your development system administrator has
|
||||
installed them, without having to worry about updating your application
|
||||
every time the version of the dependent JAR file is changed.</p>
|
||||
|
||||
<p>In the example Ant <code>build.xml</code> file, we will demonstrate
|
||||
how to define <em>build properties</em> that let you configure the locations
|
||||
of the files to be copied, without having to modify <code>build.xml</code>
|
||||
when these files change. The build properties used by a particular
|
||||
developer can be customized on a per-application basis, or defaulted to
|
||||
"standard" build properties stored in the developer's home directory.</p>
|
||||
|
||||
<p>In many cases, your development system administrator will have already
|
||||
installed the required JAR files into the <code>lib</code> directory of Tomcat.
|
||||
If this has been done, you need
|
||||
to take no actions at all - the example <code>build.xml</code> file
|
||||
automatically constructs a compile classpath that includes these files.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Source Code Control">
|
||||
|
||||
<p>As mentioned earlier, it is highly recommended that you place all of the
|
||||
source files that comprise your application under the management of a
|
||||
source code control system like the Concurrent Version System (CVS). If you
|
||||
elect to do this, every directory and file in the source hierarchy should be
|
||||
registered and saved -- but none of the generated files. If you register
|
||||
binary format files (such as images or JAR libraries), be sure to indicate
|
||||
this to your source code control system.</p>
|
||||
|
||||
<p>We recommended (in the previous section) that you should not store the
|
||||
contents of the <code>build/</code> and <code>dist/</code> directories
|
||||
created by your development process in the source code control system. An
|
||||
easy way to tell CVS to ignore these directories is to create a file named
|
||||
<code>.cvsignore</code> (note the leading period) in your top-level source
|
||||
directory, with the following contents:</p>
|
||||
<source>build
|
||||
dist
|
||||
build.properties</source>
|
||||
|
||||
<p>The reason for mentioning <code>build.properties</code> here will be
|
||||
explained in the <a href="processes.html">Processes</a> section.</p>
|
||||
|
||||
<p>Detailed instructions for your source code control environment are beyond
|
||||
the scope of this manual. However, the following steps are followed when
|
||||
using a command-line CVS client:</p>
|
||||
<ul>
|
||||
<li>To refresh the state of your source code to that stored in the
|
||||
the source repository, go to your project source directory, and
|
||||
execute <code>cvs update -dP</code>.
|
||||
<br/><br/></li>
|
||||
<li>When you create a new subdirectory in the source code hierarchy, register
|
||||
it in CVS with a command like <code>cvs add {subdirname}</code>.
|
||||
<br/><br/></li>
|
||||
<li>When you first create a new source code file, navigate to the directory
|
||||
that contains it, and register the new file with a command like
|
||||
<code>cvs add {filename}</code>.
|
||||
<br/><br/></li>
|
||||
<li>If you no longer need a particular source code file, navigate to the
|
||||
containing directory and remove the file. Then, deregister it in CVS
|
||||
with a command like <code>cvs remove {filename}</code>.
|
||||
<br/><br/></li>
|
||||
<li>While you are creating, modifying, and deleting source files, changes
|
||||
are not yet reflected in the server repository. To save your changes in
|
||||
their current state, go to the project source directory
|
||||
and execute <code>cvs commit</code>. You will be asked to write a brief
|
||||
description of the changes you have just completed, which will be stored
|
||||
with the new version of any updated source file.</li>
|
||||
</ul>
|
||||
|
||||
<p>CVS, like other source code control systems, has many additional features
|
||||
(such as the ability to tag the files that made up a particular release, and
|
||||
support for multiple development branches that can later be merged). See the
|
||||
links and references in the <a href="introduction.html">Introduction</a> for
|
||||
more information.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="BUILD.XML Configuration File">
|
||||
|
||||
<p>We will be using the <strong>ant</strong> tool to manage the compilation of
|
||||
our Java source code files, and creation of the deployment hierarchy. Ant
|
||||
operates under the control of a build file, normally called
|
||||
<code>build.xml</code>, that defines the processing steps required. This
|
||||
file is stored in the top-level directory of your source code hierarchy, and
|
||||
should be checked in to your source code control system.</p>
|
||||
|
||||
<p>Like a Makefile, the <code>build.xml</code> file provides several
|
||||
"targets" that support optional development activities (such as creating
|
||||
the associated Javadoc documentation, erasing the deployment home directory
|
||||
so you can build your project from scratch, or creating the web application
|
||||
archive file so you can distribute your application. A well-constructed
|
||||
<code>build.xml</code> file will contain internal documentation describing
|
||||
the targets that are designed for use by the developer, versus those targets
|
||||
used internally. To ask Ant to display the project documentation, change to
|
||||
the directory containing the <code>build.xml</code> file and type:</p>
|
||||
<source>ant -projecthelp</source>
|
||||
|
||||
<p>To give you a head start, a <a href="build.xml.txt">basic build.xml file</a>
|
||||
is provided that you can customize and install in the project source directory
|
||||
for your application. This file includes comments that describe the various
|
||||
targets that can be executed. Briefly, the following targets are generally
|
||||
provided:</p>
|
||||
<ul>
|
||||
<li><strong>clean</strong> - This target deletes any existing
|
||||
<code>build</code> and <code>dist</code> directories, so that they
|
||||
can be reconstructed from scratch. This allows you to guarantee that
|
||||
you have not made source code modifications that will result in
|
||||
problems at runtime due to not recompiling all affected classes.
|
||||
<br/><br/></li>
|
||||
<li><strong>compile</strong> - This target is used to compile any source code
|
||||
that has been changed since the last time compilation took place. The
|
||||
resulting class files are created in the <code>WEB-INF/classes</code>
|
||||
subdirectory of your <code>build</code> directory, exactly where the
|
||||
structure of a web application requires them to be. Because
|
||||
this command is executed so often during development, it is normally
|
||||
made the "default" target so that a simple <code>ant</code> command will
|
||||
execute it.
|
||||
<br/><br/></li>
|
||||
<li><strong>all</strong> - This target is a short cut for running the
|
||||
<code>clean</code> target, followed by the <code>compile</code> target.
|
||||
Thus, it guarantees that you will recompile the entire application, to
|
||||
ensure that you have not unknowingly introduced any incompatible changes.
|
||||
<br/><br/></li>
|
||||
<li><strong>javadoc</strong> - This target creates Javadoc API documentation
|
||||
for the Java classes in this web application. The example
|
||||
<code>build.xml</code> file assumes you want to include the API
|
||||
documentation with your app distribution, so it generates the docs
|
||||
in a subdirectory of the <code>dist</code> directory. Because you normally
|
||||
do not need to generate the Javadocs on every compilation, this target is
|
||||
usually a dependency of the <code>dist</code> target, but not of the
|
||||
<code>compile</code> target.
|
||||
<br/><br/></li>
|
||||
<li><strong>dist</strong> - This target creates a distribution directory for
|
||||
your application, including any required documentation, the Javadocs for
|
||||
your Java classes, and a web application archive (WAR) file that will be
|
||||
delivered to system administrators who wish to install your application.
|
||||
Because this target also depends on the <code>deploy</code> target, the
|
||||
web application archive will have also picked up any external dependencies
|
||||
that were included at deployment time.</li>
|
||||
</ul>
|
||||
|
||||
<p>For interactive development and testing of your web application using
|
||||
Tomcat, the following additional targets are defined:</p>
|
||||
<ul>
|
||||
<li><strong>install</strong> - Tell the currently running Tomcat to make
|
||||
the application you are developing immediately available for execution
|
||||
and testing. This action does not require Tomcat to be restarted, but
|
||||
it is also not remembered after Tomcat is restarted the next time.
|
||||
<br/><br/></li>
|
||||
<li><strong>reload</strong> - Once the application is installed, you can
|
||||
continue to make changes and recompile using the <code>compile</code>
|
||||
target. Tomcat will automatically recognize changes made to JSP pages,
|
||||
but not to servlet or JavaBean classes - this command will tell Tomcat
|
||||
to restart the currently installed application so that such changes are
|
||||
recognized.
|
||||
<br/><br/></li>
|
||||
<li><strong>remove</strong> - When you have completed your development and
|
||||
testing activities, you can optionally tell Tomcat to remove this
|
||||
application from service.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Using the development and testing targets requires some additional
|
||||
one-time setup that is described on the next page.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
166
webapps/docs/appdev/web.xml.txt
Normal file
@@ -0,0 +1,166 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<!DOCTYPE web-app
|
||||
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
|
||||
|
||||
<!-- General description of your web application -->
|
||||
|
||||
<display-name>My Web Application</display-name>
|
||||
<description>
|
||||
This is version X.X of an application to perform
|
||||
a wild and wonderful task, based on servlets and
|
||||
JSP pages. It was written by Dave Developer
|
||||
(dave@mycompany.com), who should be contacted for
|
||||
more information.
|
||||
</description>
|
||||
|
||||
|
||||
<!-- Context initialization parameters that define shared
|
||||
String constants used within your application, which
|
||||
can be customized by the system administrator who is
|
||||
installing your application. The values actually
|
||||
assigned to these parameters can be retrieved in a
|
||||
servlet or JSP page by calling:
|
||||
|
||||
String value =
|
||||
getServletContext().getInitParameter("name");
|
||||
|
||||
where "name" matches the <param-name> element of
|
||||
one of these initialization parameters.
|
||||
|
||||
You can define any number of context initialization
|
||||
parameters, including zero.
|
||||
-->
|
||||
|
||||
<context-param>
|
||||
<param-name>webmaster</param-name>
|
||||
<param-value>myaddress@mycompany.com</param-value>
|
||||
<description>
|
||||
The EMAIL address of the administrator to whom questions
|
||||
and comments about this application should be addressed.
|
||||
</description>
|
||||
</context-param>
|
||||
|
||||
|
||||
<!-- Servlet definitions for the servlets that make up
|
||||
your web application, including initialization
|
||||
parameters. With Tomcat, you can also send requests
|
||||
to servlets not listed here with a request like this:
|
||||
|
||||
http://localhost:8080/{context-path}/servlet/{classname}
|
||||
|
||||
but this usage is not guaranteed to be portable. It also
|
||||
makes relative references to images and other resources
|
||||
required by your servlet more complicated, so defining
|
||||
all of your servlets (and defining a mapping to them with
|
||||
a servlet-mapping element) is recommended.
|
||||
|
||||
Servlet initialization parameters can be retrieved in a
|
||||
servlet or JSP page by calling:
|
||||
|
||||
String value =
|
||||
getServletConfig().getInitParameter("name");
|
||||
|
||||
where "name" matches the <param-name> element of
|
||||
one of these initialization parameters.
|
||||
|
||||
You can define any number of servlets, including zero.
|
||||
-->
|
||||
|
||||
<servlet>
|
||||
<servlet-name>controller</servlet-name>
|
||||
<description>
|
||||
This servlet plays the "controller" role in the MVC architecture
|
||||
used in this application. It is generally mapped to the ".do"
|
||||
filename extension with a servlet-mapping element, and all form
|
||||
submits in the app will be submitted to a request URI like
|
||||
"saveCustomer.do", which will therefore be mapped to this servlet.
|
||||
|
||||
The initialization parameter names for this servlet are the
|
||||
"servlet path" that will be received by this servlet (after the
|
||||
filename extension is removed). The corresponding value is the
|
||||
name of the action class that will be used to process this request.
|
||||
</description>
|
||||
<servlet-class>com.mycompany.mypackage.ControllerServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>listOrders</param-name>
|
||||
<param-value>com.mycompany.myactions.ListOrdersAction</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>saveCustomer</param-name>
|
||||
<param-value>com.mycompany.myactions.SaveCustomerAction</param-value>
|
||||
</init-param>
|
||||
<!-- Load this servlet at server startup time -->
|
||||
<load-on-startup>5</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>graph</servlet-name>
|
||||
<description>
|
||||
This servlet produces GIF images that are dynamically generated
|
||||
graphs, based on the input parameters included on the request.
|
||||
It is generally mapped to a specific request URI like "/graph".
|
||||
</description>
|
||||
</servlet>
|
||||
|
||||
|
||||
<!-- Define mappings that are used by the servlet container to
|
||||
translate a particular request URI (context-relative) to a
|
||||
particular servlet. The examples below correspond to the
|
||||
servlet descriptions above. Thus, a request URI like:
|
||||
|
||||
http://localhost:8080/{contextpath}/graph
|
||||
|
||||
will be mapped to the "graph" servlet, while a request like:
|
||||
|
||||
http://localhost:8080/{contextpath}/saveCustomer.do
|
||||
|
||||
will be mapped to the "controller" servlet.
|
||||
|
||||
You may define any number of servlet mappings, including zero.
|
||||
It is also legal to define more than one mapping for the same
|
||||
servlet, if you wish to.
|
||||
-->
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>controller</servlet-name>
|
||||
<url-pattern>*.do</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>graph</servlet-name>
|
||||
<url-pattern>/graph</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<!-- Define the default session timeout for your application,
|
||||
in minutes. From a servlet or JSP page, you can modify
|
||||
the timeout for a particular session dynamically by using
|
||||
HttpSession.getMaxInactiveInterval(). -->
|
||||
|
||||
<session-config>
|
||||
<session-timeout>30</session-timeout> <!-- 30 minutes -->
|
||||
</session-config>
|
||||
|
||||
|
||||
</web-app>
|
||||
170
webapps/docs/apr.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="apr.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<title>Apache Portable Runtime (APR) based Native library for Tomcat</title>
|
||||
<author>Remy Maucherat</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Introduction">
|
||||
|
||||
<p>
|
||||
Tomcat can use the <a href="https://apr.apache.org/">Apache Portable Runtime</a> to
|
||||
provide superior scalability, performance, and better integration with native server
|
||||
technologies. The Apache Portable Runtime is a highly portable library that is at
|
||||
the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO
|
||||
functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number
|
||||
generation, system status, etc), and native process handling (shared memory, NT
|
||||
pipes and Unix sockets).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
These features allows making Tomcat a general purpose webserver, will enable much better
|
||||
integration with other native web technologies, and overall make Java much more viable as
|
||||
a full fledged webserver platform rather than simply a backend focused technology.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Installation">
|
||||
|
||||
<p>
|
||||
APR support requires three main native components to be installed:
|
||||
</p>
|
||||
<ul>
|
||||
<li>APR library</li>
|
||||
<li>JNI wrappers for APR used by Tomcat (libtcnative)</li>
|
||||
<li>OpenSSL libraries</li>
|
||||
</ul>
|
||||
|
||||
<subsection name="Windows">
|
||||
|
||||
<p>
|
||||
Windows binaries are provided for tcnative-1, which is a statically compiled .dll which includes
|
||||
OpenSSL and APR. It can be downloaded from <a href="https://tomcat.apache.org/download-native.cgi">here</a>
|
||||
as 32bit or AMD x86-64 binaries.
|
||||
In security conscious production environments, it is recommended to use separate shared dlls
|
||||
for OpenSSL, APR, and libtcnative-1, and update them as needed according to security bulletins.
|
||||
Windows OpenSSL binaries are linked from the <a href="https://www.openssl.org">Official OpenSSL
|
||||
website</a> (see related/binaries).
|
||||
</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
<subsection name="Linux">
|
||||
|
||||
<p>
|
||||
Most Linux distributions will ship packages for APR and OpenSSL. The JNI wrapper (libtcnative) will
|
||||
then have to be compiled. It depends on APR, OpenSSL, and the Java headers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Requirements:
|
||||
</p>
|
||||
<ul>
|
||||
<li>APR 1.2+ development headers (libapr1-dev package)</li>
|
||||
<li>OpenSSL 1.0.2+ development headers (libssl-dev package)</li>
|
||||
<li>JNI headers from Java compatible JDK 1.4+</li>
|
||||
<li>GNU development environment (gcc, make)</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The wrapper library sources are located in the Tomcat binary bundle, in the
|
||||
<code>bin/tomcat-native.tar.gz</code> archive.
|
||||
Once the build environment is installed and the source archive is extracted, the wrapper library
|
||||
can be compiled using (from the folder containing the configure script):
|
||||
</p>
|
||||
<source>./configure && make && make install</source>
|
||||
|
||||
</subsection>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="APR Components">
|
||||
|
||||
<p>
|
||||
Once the libraries are properly installed and available to Java (if loading fails, the library path
|
||||
will be displayed), the Tomcat connectors will automatically use APR. Configuration of the connectors
|
||||
is similar to the regular connectors, but have a few extra attributes which are used to configure
|
||||
APR components. Note that the defaults should be well tuned for most use cases, and additional
|
||||
tweaking shouldn't be required.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When APR is enabled, the following features are also enabled in Tomcat:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Secure session ID generation by default on all platforms (platforms other than Linux required
|
||||
random number generation using a configured entropy)</li>
|
||||
<li>OS level statistics on memory usage and CPU usage by the Tomcat process are displayed by
|
||||
the status servlet</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="APR Lifecycle Listener Configuration">
|
||||
<p>See <a href="config/listeners.html#APR_Lifecycle_Listener_-_org.apache.catalina.core.AprLifecycleListener">the
|
||||
listener configuration</a>.</p>
|
||||
</section>
|
||||
|
||||
<section name="APR Connectors Configuration">
|
||||
|
||||
<subsection name="HTTP/HTTPS">
|
||||
|
||||
<p>For HTTP configuration, see the <a href="config/http.html">HTTP</a>
|
||||
connector configuration documentation.</p>
|
||||
|
||||
<p>For HTTPS configuration, see the
|
||||
<a href="config/http.html#SSL_Support">HTTPS</a> connector configuration
|
||||
documentation.</p>
|
||||
|
||||
<p>An example SSL Connector declaration is:</p>
|
||||
<source><![CDATA[<Connector port="443" maxHttpHeaderSize="8192"
|
||||
maxThreads="150"
|
||||
enableLookups="false" disableUploadTimeout="true"
|
||||
acceptCount="100" scheme="https" secure="true"
|
||||
SSLEnabled="true"
|
||||
SSLCertificateFile="${catalina.base}/conf/localhost.crt"
|
||||
SSLCertificateKeyFile="${catalina.base}/conf/localhost.key" />]]></source>
|
||||
|
||||
|
||||
</subsection>
|
||||
|
||||
<subsection name="AJP">
|
||||
|
||||
<p>For AJP configuration, see the <a href="config/ajp.html">AJP</a>
|
||||
connector configuration documentation.</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</document>
|
||||
69
webapps/docs/architecture/index.xml
Normal file
@@ -0,0 +1,69 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="index.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="yoavs@apache.org">Yoav Shapira</author>
|
||||
<title>Table of Contents</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<section name="Preface">
|
||||
|
||||
<p>This section of the Tomcat documentation attempts to explain
|
||||
the architecture and design of the Tomcat server. It includes significant
|
||||
contributions from several tomcat developers:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Yoav Shapira
|
||||
(<a href="mailto:yoavs@apache.org">yoavs@apache.org</a>)</li>
|
||||
<li>Jeanfrancois Arcand
|
||||
(<a href="mailto:jfarcand@apache.org">jfarcand@apache.org</a>)</li>
|
||||
<li>Filip Hanik
|
||||
(<a href="mailto:fhanik@apache.org">fhanik@apache.org</a>)</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Table of Contents">
|
||||
|
||||
<p>The information presented is divided into the following sections:</p>
|
||||
<ul>
|
||||
<li><a href="overview.html"><strong>Overview</strong></a> -
|
||||
An overview of the Tomcat server architecture with key terms
|
||||
and concepts.</li>
|
||||
<li><a href="startup.html"><strong>Server Startup</strong></a> -
|
||||
A detailed description, with sequence diagrams, of how the Tomcat
|
||||
server starts up.</li>
|
||||
<li><a href="requestProcess.html"><strong>Request Process Flow</strong></a> -
|
||||
A detailed description of how Tomcat handles a request.</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
138
webapps/docs/architecture/overview.xml
Normal file
@@ -0,0 +1,138 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="overview.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="yoavs@apache.org">Yoav Shapira</author>
|
||||
<title>Architecture Overview</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<section name="Overview">
|
||||
<p>
|
||||
This page provides an overview of the Tomcat server architecture.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section name="Terms">
|
||||
|
||||
<subsection name="Server">
|
||||
<p>
|
||||
In the Tomcat world, a
|
||||
<a href="../config/server.html">Server</a> represents the whole container.
|
||||
Tomcat provides a default implementation of the
|
||||
<a href="../api/org/apache/catalina/Server.html">Server interface</a>
|
||||
which is rarely customized by users.
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Service">
|
||||
<p>
|
||||
A <a href="../config/service.html">Service</a> is an intermediate component
|
||||
which lives inside a Server and ties one or more Connectors to exactly one
|
||||
Engine. The Service element is rarely customized by users, as the default
|
||||
implementation is simple and sufficient:
|
||||
<a href="../api/org/apache/catalina/Service.html">Service interface</a>.
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Engine">
|
||||
<p>
|
||||
An
|
||||
<a href="../config/engine.html">Engine</a> represents request processing
|
||||
pipeline for a specific Service. As a Service may have multiple Connectors,
|
||||
the Engine receives and processes all requests from these connectors, handing
|
||||
the response back to the appropriate connector for transmission to the client.
|
||||
The <a href="../api/org/apache/catalina/Engine.html">Engine interface</a>
|
||||
may be implemented to supply custom Engines, though this is uncommon.
|
||||
</p>
|
||||
<p>
|
||||
Note that the Engine may be used for Tomcat server clustering via the
|
||||
jvmRoute parameter. Read the Clustering documentation for more information.
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Host">
|
||||
<p>
|
||||
A <a href="../config/host.html">Host</a> is an association of a network name,
|
||||
e.g. www.yourcompany.com, to the Tomcat server. An Engine may contain
|
||||
multiple hosts, and the Host element also supports network aliases such as
|
||||
yourcompany.com and abc.yourcompany.com. Users rarely create custom
|
||||
<a href="../api/org/apache/catalina/Host.html">Hosts</a>
|
||||
because the
|
||||
<a href="../api/org/apache/catalina/core/StandardHost.html">StandardHost
|
||||
implementation</a> provides significant additional functionality.
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Connector">
|
||||
<p>
|
||||
A Connector handles communications with the client. There are multiple
|
||||
connectors available with Tomcat. These include the
|
||||
<a href="../config/http.html">HTTP connector</a> which is used for
|
||||
most HTTP traffic, especially when running Tomcat as a standalone server,
|
||||
and the <a href="../config/ajp.html">AJP connector</a> which implements
|
||||
the AJP protocol used when connecting Tomcat to a web server such as
|
||||
Apache HTTPD server. Creating a customized connector is a significant
|
||||
effort.
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Context">
|
||||
<p>
|
||||
A
|
||||
<a href="../config/context.html">Context</a>
|
||||
represents a web application. A Host may contain multiple
|
||||
contexts, each with a unique path. The
|
||||
<a href="../api/org/apache/catalina/Context.html">Context
|
||||
interface</a> may be implemented to create custom Contexts, but
|
||||
this is rarely the case because the
|
||||
<a href="../api/org/apache/catalina/core/StandardContext.html">
|
||||
StandardContext</a> provides significant additional functionality.
|
||||
</p>
|
||||
</subsection>
|
||||
</section>
|
||||
|
||||
<section name="Comments">
|
||||
<p>
|
||||
Tomcat is designed to be a fast and efficient implementation of the
|
||||
Servlet Specification. Tomcat came about as the reference implementation
|
||||
of this specification, and has remained rigorous in adhering to the
|
||||
specification. At the same time, significant attention has been paid
|
||||
to Tomcat's performance and it is now on par with other servlet containers,
|
||||
including commercial ones.
|
||||
</p>
|
||||
<p>
|
||||
In recent releases of Tomcat, mostly starting with Tomcat 5,
|
||||
we have begun efforts to make more aspects of Tomcat manageable via
|
||||
JMX. In addition, the Manager and Admin webapps have been greatly
|
||||
enhanced and improved. Manageability is a primary area of concern
|
||||
for us as the product matures and the specification becomes more
|
||||
stable.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</document>
|
||||
45
webapps/docs/architecture/project.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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.
|
||||
-->
|
||||
<project name="Apache Tomcat 8 Architecture"
|
||||
href="https://tomcat.apache.org/">
|
||||
|
||||
<title>Apache Tomcat 8 Architecture</title>
|
||||
|
||||
<logo href="/images/tomcat.gif">
|
||||
The Apache Tomcat Servlet/JSP Container
|
||||
</logo>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<menu name="Links">
|
||||
<item name="Docs Home" href="../index.html" />
|
||||
<item name="Architecture Home" href="index.html"/>
|
||||
<item name="FAQ" href="https://wiki.apache.org/tomcat/FAQ" />
|
||||
<item name="User Comments" href="#comments_section"/>
|
||||
</menu>
|
||||
|
||||
<menu name="Contents">
|
||||
<item name="Contents" href="index.html" />
|
||||
<item name="Overview" href="overview.html" />
|
||||
<item name="Server Startup" href="startup.html" />
|
||||
<item name="Request Process" href="requestProcess.html" />
|
||||
</menu>
|
||||
|
||||
</body>
|
||||
</project>
|
||||
74
webapps/docs/architecture/requestProcess.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="requestProcess.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="yoavs@apache.org">Yoav Shapira</author>
|
||||
<title>Request Process Flow</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<section name="Request Process Flow">
|
||||
|
||||
<p>
|
||||
This page describes the process used by Tomcat to handle
|
||||
an incoming request. This process is largely defined by
|
||||
the Servlet Specification, which outlines the order
|
||||
of events that must take place.
|
||||
</p>
|
||||
|
||||
<subsection name="description">
|
||||
<p>
|
||||
TODO
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="diagrams">
|
||||
<p>
|
||||
A UML sequence diagram of the request process is available
|
||||
<a href="requestProcess/request-process.png">here.</a>
|
||||
</p>
|
||||
<p>
|
||||
A UML sequence diagram of the authentication process is available
|
||||
<a href="requestProcess/authentication-process.png">here.</a>
|
||||
</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
<subsection name="comments">
|
||||
<p>
|
||||
The Servlet Specification provides many opportunities for
|
||||
listening in (using Listeners) or modifying (using Filters)
|
||||
the request handling process even before the request arrives
|
||||
at the servlet that will handle it.
|
||||
</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
|
After Width: | Height: | Size: 42 KiB |
BIN
webapps/docs/architecture/requestProcess/request-process.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
73
webapps/docs/architecture/startup.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="startup.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="yoavs@apache.org">Yoav Shapira</author>
|
||||
<title>Startup</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<section name="Server Startup">
|
||||
|
||||
<p>
|
||||
This page describes how the Tomcat server starts up. There are several
|
||||
different ways to start tomcat, including:
|
||||
</p>
|
||||
<ul>
|
||||
<li>From the command line.</li>
|
||||
<li>From a Java program as an embedded server.</li>
|
||||
<li>Automatically as a Windows service.</li>
|
||||
</ul>
|
||||
|
||||
<subsection name="description">
|
||||
<p>
|
||||
A text description of the startup procedure is available
|
||||
<a href="startup/serverStartup.txt">here.</a>
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="diagram">
|
||||
<p>
|
||||
A UML sequence diagram of the startup procedure is available
|
||||
<a href="startup/serverStartup.pdf">here.</a>
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="comments">
|
||||
<p>
|
||||
The startup process can be customized in many ways, both
|
||||
by modifying Tomcat code and by implementing your own
|
||||
LifecycleListeners which are then registered in the server.xml
|
||||
configuration file.
|
||||
</p>
|
||||
|
||||
</subsection>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
BIN
webapps/docs/architecture/startup/serverStartup.pdf
Normal file
139
webapps/docs/architecture/startup/serverStartup.txt
Normal file
@@ -0,0 +1,139 @@
|
||||
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 Startup Sequence
|
||||
|
||||
Sequence 1. Start from Command Line
|
||||
Class: org.apache.catalina.startup.Bootstrap
|
||||
What it does:
|
||||
a) Set up classloaders
|
||||
commonLoader (common)-> System Loader
|
||||
sharedLoader (shared)-> commonLoader -> System Loader
|
||||
catalinaLoader(server) -> commonLoader -> System Loader
|
||||
(by default the commonLoader is used for the
|
||||
sharedLoader and the serverLoader)
|
||||
b) Load startup class (reflection)
|
||||
org.apache.catalina.startup.Catalina
|
||||
setParentClassloader -> sharedLoader
|
||||
Thread.contextClassloader -> catalinaLoader
|
||||
c) Bootstrap.daemon.init() complete
|
||||
|
||||
Sequence 2. Process command line argument (start, stop)
|
||||
Class: org.apache.catalina.startup.Bootstrap (assume command->start)
|
||||
What it does:
|
||||
a) Catalina.setAwait(true);
|
||||
b) Catalina.load()
|
||||
b1) initDirs() -> set properties like
|
||||
catalina.home
|
||||
catalina.base == catalina.home (most cases)
|
||||
b2) initNaming
|
||||
setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
|
||||
org.apache.naming.java.javaURLContextFactory ->default)
|
||||
b3) createStartDigester()
|
||||
Configures a digester for the main server.xml elements like
|
||||
org.apache.catalina.core.StandardServer (can change of course :)
|
||||
org.apache.catalina.deploy.NamingResources
|
||||
Stores naming resources in the J2EE JNDI tree
|
||||
org.apache.catalina.LifecycleListener
|
||||
implements events for start/stop of major components
|
||||
org.apache.catalina.core.StandardService
|
||||
The single entry for a set of connectors,
|
||||
so that a container can listen to multiple connectors
|
||||
ie, single entry
|
||||
org.apache.catalina.Connector
|
||||
Connectors to listen for incoming requests only
|
||||
It also adds the following rulesets to the digester
|
||||
NamingRuleSet
|
||||
EngineRuleSet
|
||||
HostRuleSet
|
||||
ContextRuleSet
|
||||
b4) Load the server.xml and parse it using the digester
|
||||
Parsing the server.xml using the digester is an automatic
|
||||
XML-object mapping tool, that will create the objects defined in server.xml
|
||||
Startup of the actual container has not started yet.
|
||||
b5) Assigns System.out and System.err to the SystemLogHandler class
|
||||
b6) Calls initialize on all components, this makes each object register itself with the
|
||||
JMX agent.
|
||||
During the process call the Connectors also initialize the adapters.
|
||||
The adapters are the components that do the request pre-processing.
|
||||
Typical adapters are HTTP1.1 (default if no protocol is specified,
|
||||
org.apache.coyote.http11.Http11NioProtocol)
|
||||
AJP1.3 for mod_jk etc.
|
||||
|
||||
c) Catalina.start()
|
||||
c1) Starts the NamingContext and binds all JNDI references into it
|
||||
c2) Starts the services under <Server> which are:
|
||||
StandardService -> starts Engine (ContainerBase -> Realm,Cluster etc)
|
||||
c3) StandardHost (started by the service)
|
||||
Configures an ErrorReportValve to do proper HTML output for different HTTP
|
||||
errors codes
|
||||
Starts the Valves in the pipeline (at least the ErrorReportValve)
|
||||
Configures the StandardHostValve,
|
||||
this valves ties the Webapp Class loader to the thread context
|
||||
it also finds the session for the request
|
||||
and invokes the context pipeline
|
||||
Starts the HostConfig component
|
||||
This component deploys all the webapps
|
||||
(webapps & conf/Catalina/localhost/*.xml)
|
||||
HostConfig will create a Digester for your context, this digester
|
||||
will then invoke ContextConfig.start()
|
||||
The ContextConfig.start() will process the default web.xml (conf/web.xml)
|
||||
and then process the applications web.xml (WEB-INF/web.xml)
|
||||
|
||||
c4) During the lifetime of the container (StandardEngine) there is a background thread that
|
||||
keeps checking if the context has changed. If a context changes (timestamp of war file,
|
||||
context xml file, web.xml) then a reload is issued (stop/remove/deploy/start)
|
||||
|
||||
d) Tomcat receives a request on an HTTP port
|
||||
d1) The request is received by a separate thread which is waiting in the ThreadPoolExecutor
|
||||
class. It is waiting for a request in a regular ServerSocket.accept() method.
|
||||
When a request is received, this thread wakes up.
|
||||
d2) The ThreadPoolExecutor assigns the a TaskThread to handle the request.
|
||||
It also supplies a JMX object name to the catalina container (not used I believe)
|
||||
d3) The processor to handle the request in this case is Coyote Http11Processor,
|
||||
and the process method is invoked.
|
||||
This same processor is also continuing to check the input stream of the socket
|
||||
until the keep alive point is reached or the connection is disconnected.
|
||||
d4) The HTTP request is parsed using an internal buffer class (Http11InputBuffer)
|
||||
The buffer class parses the request line, the headers, etc and store the result in a
|
||||
Coyote request (not an HTTP request) This request contains all the HTTP info, such
|
||||
as servername, port, scheme, etc.
|
||||
d5) The processor contains a reference to an Adapter, in this case it is the
|
||||
CoyoteAdapter. Once the request has been parsed, the Http11Processor
|
||||
invokes service() on the adapter. In the service method, the Request contains a
|
||||
CoyoteRequest and CoyoteResponse (null for the first time)
|
||||
The CoyoteRequest(Response) implements HttpRequest(Response) and HttpServletRequest(Response)
|
||||
The adapter parses and associates everything with the request, cookies, the context through a
|
||||
Mapper, etc
|
||||
d6) When the parsing is finished, the CoyoteAdapter invokes its container (StandardEngine)
|
||||
and invokes the invoke(request,response) method.
|
||||
This initiates the HTTP request into the Catalina container starting at the engine level
|
||||
d7) The StandardEngine.invoke() simply invokes the container pipeline.invoke()
|
||||
d8) By default the engine only has one valve the StandardEngineValve, this valve simply
|
||||
invokes the invoke() method on the Host pipeline (StandardHost.getPipeLine())
|
||||
d9) the StandardHost has two valves by default, the StandardHostValve and the ErrorReportValve
|
||||
d10) The standard host valve associates the correct class loader with the current thread
|
||||
It also retrieves the Manager and the session associated with the request (if there is one)
|
||||
If there is a session access() is called to keep the session alive
|
||||
d11) After that the StandardHostValve invokes the pipeline on the context associated
|
||||
with the request.
|
||||
d12) The first valve that gets invoked by the Context pipeline is the FormAuthenticator
|
||||
valve. Then the StandardContextValve gets invoke.
|
||||
The StandardContextValve invokes any context listeners associated with the context.
|
||||
Next it invokes the pipeline on the Wrapper component (StandardWrapperValve)
|
||||
d13) During the invocation of the StandardWrapperValve, the JSP wrapper (Jasper) gets invoked
|
||||
This results in the actual compilation of the JSP.
|
||||
And then invokes the actual servlet.
|
||||
e) Invocation of the servlet class
|
||||
55
webapps/docs/balancer-howto.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="balancer-howto.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="yoavs@apache.org">Yoav Shapira</author>
|
||||
<author>Remy Maucherat</author>
|
||||
<author>Andy Oliver</author>
|
||||
<title>Load Balancer How-To</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Using the JK 1.2.x native connector">
|
||||
|
||||
Please refer to the JK 1.2.x documentation.
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Using Apache HTTP Server 2.x with mod_proxy">
|
||||
|
||||
Please refer to the mod_proxy documentation for Apache HTTP Server 2.2. This supports either
|
||||
HTTP or AJP load balancing. This new version of mod_proxy is also usable with
|
||||
Apache HTTP Server 2.0, but mod_proxy will have to be compiled separately using the code
|
||||
from Apache HTTP Server 2.2.
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
</document>
|
||||
280
webapps/docs/building.xml
Normal file
@@ -0,0 +1,280 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document>
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<title>Building Tomcat</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Introduction">
|
||||
|
||||
<p>
|
||||
Building Apache Tomcat from source is very easy, and is the first step to
|
||||
contributing to Tomcat. The complete and comprehensive instructions are
|
||||
provided in the file <a href="BUILDING.txt">BUILDING.txt</a>.
|
||||
The following is a quick step by step guide.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Download a Java Development Kit (JDK) version 7">
|
||||
|
||||
<p>
|
||||
Building Apache Tomcat requires a JDK (version 7) to be installed. You can download one from<br />
|
||||
<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a><br/>
|
||||
<a href="http://openjdk.java.net/install/index.html">http://openjdk.java.net/install/index.html</a><br/>
|
||||
or another JDK vendor.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>IMPORTANT</b>: Set an environment variable JAVA_HOME to the pathname of the
|
||||
directory into which you installed the JDK release.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Install Apache Ant 1.9.8 or later">
|
||||
|
||||
<p>
|
||||
Download a binary distribution of Ant 1.9.8 or later from
|
||||
<a href="https://ant.apache.org/bindownload.cgi">here</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Unpack the binary distribution into a convenient location so that the
|
||||
Ant release resides in its own directory (conventionally named
|
||||
<code>apache-ant-1.9.x</code>). For the remainder of this guide,
|
||||
the symbolic name <code>${ant.home}</code> is used to refer to the full pathname of
|
||||
the Ant installation directory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>IMPORTANT</b>: Create an ANT_HOME environment variable to point the directory <code>${ant.home}</code>,
|
||||
and modify the PATH environment variable to include directory
|
||||
<code>${ant.home}/bin</code> in its list. This makes the <code>ant</code> command line script
|
||||
available, which will be used to actually perform the build.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Checkout or obtain the Tomcat source code">
|
||||
|
||||
<p>
|
||||
Tomcat SVN repository URL:
|
||||
<a href="https://svn.apache.org/repos/asf/tomcat/tc8.5.x/trunk/">https://svn.apache.org/repos/asf/tomcat/tc8.5.x/trunk/</a>
|
||||
</p>
|
||||
<p>
|
||||
Tomcat source packages:
|
||||
<download>https://tomcat.apache.org/download-<version-major/>0.cgi</download>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Checkout the source using SVN, selecting a tag for released version or
|
||||
trunk for the current development code, or download and unpack a
|
||||
source package. For the remainder of this guide, the symbolic name
|
||||
<code>${tomcat.source}</code> is used to refer to the
|
||||
location where the source has been placed.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Configure download area">
|
||||
|
||||
<p>
|
||||
Building Tomcat involves downloading a number of libraries that it depends on.
|
||||
It is strongly recommended to configure download area for those libraries.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
By default the build is configured to download the dependencies into the
|
||||
<code>${user.home}/tomcat-build-libs</code> directory. You can change this
|
||||
(see below) but it must be an absolute path.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The build is controlled by creating a
|
||||
<code>${tomcat.source}/build.properties</code> file. It can be used to
|
||||
redefine any property that is present in <code>build.properties.default</code>
|
||||
and <code>build.xml</code> files. The <code>build.properties</code> file
|
||||
does not exist by default. You have to create it.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The download area is defined by property <code>base.path</code>. For example:
|
||||
</p>
|
||||
|
||||
<source><![CDATA[# ----- Default Base Path for Dependent Packages -----
|
||||
# Replace this path with the directory path where
|
||||
# dependencies binaries should be downloaded.
|
||||
base.path=/home/me/some-place-to-download-to]]></source>
|
||||
|
||||
<p>
|
||||
Different versions of Tomcat are allowed to share the same download area.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Another example:
|
||||
</p>
|
||||
|
||||
<source>base.path=${user.dir}/../libraries-tomcat<version-major-minor/></source>
|
||||
|
||||
<p>
|
||||
Users who access the Internet through a proxy must use the properties
|
||||
file to indicate to Ant the proxy configuration:
|
||||
</p>
|
||||
|
||||
<source><![CDATA[# ----- Proxy setup -----
|
||||
proxy.host=proxy.domain
|
||||
proxy.port=8080
|
||||
proxy.use=on]]></source>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Building Tomcat">
|
||||
|
||||
<p>
|
||||
Use the following commands to build Tomcat:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<code>cd ${tomcat.source}</code><br/>
|
||||
<code>ant</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once the build has completed successfully, a usable Tomcat installation will have been
|
||||
produced in the <code>${tomcat.source}/output/build</code> directory, and can be started
|
||||
and stopped with the usual scripts.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section name="Building with Eclipse">
|
||||
|
||||
<p>
|
||||
<b>IMPORTANT:</b> This is not a supported means of building Tomcat; this information is
|
||||
provided without warranty :-).
|
||||
The only supported means of building Tomcat is with the Ant build described above.
|
||||
However, some developers like to work on Java code with a Java IDE,
|
||||
and the following steps have been used by some developers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>NOTE:</b> This will not let you build everything under Eclipse;
|
||||
the build process requires use of Ant for the many stages that aren't
|
||||
simple Java compilations.
|
||||
However, it will allow you to view and edit the Java code,
|
||||
get warnings, reformat code, perform refactorings, run Tomcat
|
||||
under the IDE, and so on.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>WARNING:</b> Do not forget to create and configure
|
||||
<code>${tomcat.source}/build.properties</code> file as described above
|
||||
before running any Ant targets.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Sample Eclipse project files and launch targets are provided in the
|
||||
<code>res/ide-support/eclipse</code> directory of the source tree.
|
||||
The instructions below will automatically copy these into the required locations.
|
||||
</p>
|
||||
<p>
|
||||
An Ant target is provided as a convenience to download all binary dependencies, and to create
|
||||
the Eclipse project and classpath files in the root of the source tree.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<code>cd ${tomcat.source}</code><br/>
|
||||
<code>ant ide-eclipse</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Start Eclipse and create a new Workspace.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Open the <em>Preferences</em> dialog and then select <em>Java->Build Path->Classpath
|
||||
Variables</em> to add two new <em>Classpath Variables</em>:
|
||||
</p>
|
||||
|
||||
|
||||
<table class="defaultTable">
|
||||
<tr><td>TOMCAT_LIBS_BASE</td><td>The same location as the <code>base.path</code>
|
||||
setting in <code>build.properties</code>, where the binary dependencies have been downloaded</td></tr>
|
||||
<tr><td>ANT_HOME</td><td>the base path of Ant 1.9.8 or later</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<p>
|
||||
Use <em>File->Import</em> and choose <em>Existing Projects into Workspace</em>.
|
||||
From there choose the root directory of the Tomcat source tree (<code>${tomcat.source}</code>)
|
||||
and import the Tomcat project located there.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<code>start-tomcat</code> and <code>stop-tomcat</code> launch configurations are provided in
|
||||
<code>res/ide-support/eclipse</code> and will be available in the <em>Run->Run Configurations</em>
|
||||
dialog. Use these to start and stop Tomcat from Eclipse.
|
||||
If you want to configure these yourself (or are using a different IDE)
|
||||
then use <code>org.apache.catalina.startup.Bootstrap</code> as the main class,
|
||||
<code>start</code>/<code>stop</code> etc. as program arguments, and specify <code>-Dcatalina.home=...</code>
|
||||
(with the name of your build directory) as VM arguments.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Tweaking a few formatting preferences will make it much easier to keep consistent with Tomcat
|
||||
coding conventions (and have your contributions accepted):
|
||||
</p>
|
||||
|
||||
<table class="defaultTable">
|
||||
<tr><td>Java -> Code Style -> Formatter -> Edit...</td>
|
||||
<td>Tab policy: Spaces only<br/>Tab and Indentation size: 4</td></tr>
|
||||
<tr><td>General -> Editors -> Text Editors</td>
|
||||
<td>Displayed tab width: 2<br/>Insert spaces for tabs<br/>Show whitespace characters (optional)</td></tr>
|
||||
<tr><td>XML -> XML Files -> Editor</td><td>Indent using spaces<br/>Indentation size: 2</td></tr>
|
||||
<tr><td>Ant -> Editor -> Formatter</td><td>Tab size: 2<br/>Use tab character instead of spaces: unchecked</td></tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
The recommended configuration of Compiler Warnings is documented in
|
||||
<code>res/ide-support/eclipse/java-compiler-errors-warnings.txt</code> file.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Building with other IDEs">
|
||||
<p>
|
||||
The same general approach should work for most IDEs; it has been reported
|
||||
to work in IntelliJ IDEA, for example.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</document>
|
||||
168
webapps/docs/cgi-howto.xml
Normal file
@@ -0,0 +1,168 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="cgi-howto.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<title>CGI How To</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Introduction">
|
||||
|
||||
<p>The CGI (Common Gateway Interface) defines a way for a web server to
|
||||
interact with external content-generating programs, which are often
|
||||
referred to as CGI programs or CGI scripts.
|
||||
</p>
|
||||
|
||||
<p>Within Tomcat, CGI support can be added when you are using Tomcat as your
|
||||
HTTP server and require CGI support. Typically this is done
|
||||
during development when you don't want to run a web server like
|
||||
Apache httpd.
|
||||
Tomcat's CGI support is largely compatible with Apache httpd's,
|
||||
but there are some limitations (e.g., only one cgi-bin directory).
|
||||
</p>
|
||||
|
||||
<p>CGI support is implemented using the servlet class
|
||||
<code>org.apache.catalina.servlets.CGIServlet</code>. Traditionally,
|
||||
this servlet is mapped to the URL pattern "/cgi-bin/*".</p>
|
||||
|
||||
<p>By default CGI support is disabled in Tomcat.</p>
|
||||
</section>
|
||||
|
||||
<section name="Installation">
|
||||
|
||||
<p><strong>CAUTION</strong> - CGI scripts are used to execute programs
|
||||
external to the Tomcat JVM. If you are using the Java SecurityManager this
|
||||
will bypass your security policy configuration in <code>catalina.policy.</code></p>
|
||||
|
||||
<p>To enable CGI support:</p>
|
||||
|
||||
<ol>
|
||||
<li><p>There are commented-out sample servlet and servlet-mapping elements for
|
||||
CGI servlet in the default <code>$CATALINA_BASE/conf/web.xml</code> file.
|
||||
To enable CGI support in your web application, copy that servlet and
|
||||
servlet-mapping declarations into <code>WEB-INF/web.xml</code> file of your
|
||||
web application.</p>
|
||||
|
||||
<p>Uncommenting the servlet and servlet-mapping in
|
||||
<code>$CATALINA_BASE/conf/web.xml</code> file enables CGI for all installed
|
||||
web applications at once.</p>
|
||||
</li>
|
||||
|
||||
<li><p>Set <code>privileged="true"</code> on the Context element for your
|
||||
web application.</p>
|
||||
|
||||
<p>Only Contexts which are marked as privileged are allowed to use the
|
||||
CGI servlet. Note that modifying the global <code>$CATALINA_BASE/conf/context.xml</code>
|
||||
file affects all web applications. See
|
||||
<a href="config/context.html">Context documentation</a> for details.</p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Configuration">
|
||||
|
||||
<p>There are several servlet init parameters which can be used to
|
||||
configure the behaviour of the CGI servlet.</p>
|
||||
<ul>
|
||||
<li><strong>cgiMethods</strong> - Comma separated list of HTTP methods. Requests
|
||||
using one of these methods will be passed to the CGI script for the script to
|
||||
generate the response. The default value is <code>GET,POST</code>. Use
|
||||
<code>*</code> for the script to handle all requests regardless of method.
|
||||
Unless over-ridden by the configuration of this parameter, requests using HEAD,
|
||||
OPTIONS or TRACE will have handled by the superclass.</li>
|
||||
<li><strong>cgiPathPrefix</strong> - The CGI search path will start at
|
||||
the web application root directory + File.separator + this prefix.
|
||||
By default there is no value, which results in the web application root
|
||||
directory being used as the search path. The recommended value is
|
||||
<code>WEB-INF/cgi</code></li>
|
||||
<li><strong>cmdLineArgumentsDecoded</strong> - If command line argumemnts
|
||||
are enabled (via <strong>enableCmdLineArguments</strong>) and Tomcat is running
|
||||
on Windows then each individual decoded command line argument must match this
|
||||
pattern else the request will be rejected. This is to protect against known
|
||||
issues passing command line arguments from Java to Windows. These issues can
|
||||
lead to remote code execution. For more information on these issues see
|
||||
<a href="https://codewhitesec.blogspot.com/2016/02/java-and-command-line-injections-in-windows.html">Markus
|
||||
Wulftange's blog</a> and this archived
|
||||
<a href="https://web.archive.org/web/20161228144344/https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/">blog
|
||||
by Daniel Colascione</a>.</li>
|
||||
<li><strong>cmdLineArgumentsEncoded</strong> - If command line argumemnts
|
||||
are enabled (via <strong>enableCmdLineArguments</strong>) individual encoded
|
||||
command line argument must match this pattern else the request will be rejected.
|
||||
The default matches the allowed values defined by RFC3875 and is
|
||||
<code>[a-zA-Z0-9\Q%;/?:@&,$-_.!~*'()\E]+</code></li>
|
||||
<li><strong>enableCmdLineArguments</strong> - Are command line arguments
|
||||
generated from the query string as per section 4.4 of 3875 RFC? The default is
|
||||
<code>false</code>.</li>
|
||||
<li><strong>environment-variable-</strong> - An environment to be set for the
|
||||
execution environment of the CGI script. The name of variable is taken from the
|
||||
parameter name. To configure an environment variable named FOO, configure a
|
||||
parameter named environment-variable-FOO. The parameter value is used as the
|
||||
environment variable value. The default is no environment variables.</li>
|
||||
<li><strong>executable</strong> - The name of the executable to be used to
|
||||
run the script. You may explicitly set this parameter to be an empty string
|
||||
if your script is itself executable (e.g. an exe file). Default is
|
||||
<code>perl</code>.</li>
|
||||
<li><strong>executable-arg-1</strong>, <strong>executable-arg-2</strong>,
|
||||
and so on - additional arguments for the executable. These precede the
|
||||
CGI script name. By default there are no additional arguments.</li>
|
||||
<li><strong>envHttpHeaders</strong> - A regular expression used to select the
|
||||
HTTP headers passed to the CGI process as environment variables. Note that
|
||||
headers are converted to upper case before matching and that the entire header
|
||||
name must match the pattern. Default is
|
||||
<code>ACCEPT[-0-9A-Z]*|CACHE-CONTROL|COOKIE|HOST|IF-[-0-9A-Z]*|REFERER|USER-AGENT</code>
|
||||
</li>
|
||||
<li><strong>parameterEncoding</strong> - Name of the parameter encoding
|
||||
to be used with the CGI servlet. Default is
|
||||
<code>System.getProperty("file.encoding","UTF-8")</code>. That is the system
|
||||
default encoding, or UTF-8 if that system property is not available.</li>
|
||||
<li><strong>passShellEnvironment</strong> - Should the shell environment
|
||||
variables from Tomcat process (if any) be passed to the CGI script? Default is
|
||||
<code>false</code>.</li>
|
||||
<li><strong>stderrTimeout</strong> - The time (in milliseconds) to wait for
|
||||
the reading of stderr to complete before terminating the CGI process. Default
|
||||
is <code>2000</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p>The CGI script executed depends on the configuration of the CGI Servlet and
|
||||
how the request is mapped to the CGI Servlet. The CGI search path starts at the
|
||||
web application root directory + File.separator + cgiPathPrefix. The
|
||||
<strong>pathInfo</strong> is then searched unless it is <code>null</code> - in
|
||||
which case the <strong>servletPath</strong> is searched.</p>
|
||||
|
||||
<p>The search starts with the first path segment and expands one path segment
|
||||
at a time until no path segments are left (resulting in a 404) or a script is
|
||||
found. Any remaining path segments are passed to the script in the
|
||||
<strong>PATH_INFO</strong> environment variable.</p>
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
</document>
|
||||
7757
webapps/docs/changelog.xml
Normal file
292
webapps/docs/class-loader-howto.xml
Normal file
@@ -0,0 +1,292 @@
|
||||
<?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.
|
||||
-->
|
||||
<!DOCTYPE document [
|
||||
<!ENTITY project SYSTEM "project.xml">
|
||||
]>
|
||||
<document url="class-loader-howto.html">
|
||||
|
||||
&project;
|
||||
|
||||
<properties>
|
||||
<author email="craigmcc@apache.org">Craig R. McClanahan</author>
|
||||
<author email="yoavs@apache.org">Yoav Shapira</author>
|
||||
<title>Class Loader How-To</title>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
|
||||
<section name="Table of Contents">
|
||||
<toc/>
|
||||
</section>
|
||||
|
||||
<section name="Overview">
|
||||
|
||||
<p>Like many server applications, Tomcat installs a variety of class loaders
|
||||
(that is, classes that implement <code>java.lang.ClassLoader</code>) to allow
|
||||
different portions of the container, and the web applications running on the
|
||||
container, to have access to different repositories of available classes and
|
||||
resources. This mechanism is used to provide the functionality defined in the
|
||||
Servlet Specification, version 2.4 — in particular, Sections 9.4
|
||||
and 9.6.</p>
|
||||
|
||||
<p>In a Java environment, class loaders are
|
||||
arranged in a parent-child tree. Normally, when a class loader is asked to
|
||||
load a particular class or resource, it delegates the request to a parent
|
||||
class loader first, and then looks in its own repositories only if the parent
|
||||
class loader(s) cannot find the requested class or resource. Note, that the
|
||||
model for web application class loaders <em>differs</em> slightly from this,
|
||||
as discussed below, but the main principles are the same.</p>
|
||||
|
||||
<p>When Tomcat is started, it creates a set of class loaders that are
|
||||
organized into the following parent-child relationships, where the parent
|
||||
class loader is above the child class loader:</p>
|
||||
|
||||
<source> Bootstrap
|
||||
|
|
||||
System
|
||||
|
|
||||
Common
|
||||
/ \
|
||||
Webapp1 Webapp2 ...</source>
|
||||
|
||||
<p>The characteristics of each of these class loaders, including the source
|
||||
of classes and resources that they make visible, are discussed in detail in
|
||||
the following section.</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Class Loader Definitions">
|
||||
|
||||
<p>As indicated in the diagram above, Tomcat creates the following class
|
||||
loaders as it is initialized:</p>
|
||||
<ul>
|
||||
<li><p><strong>Bootstrap</strong> — This class loader contains the basic
|
||||
runtime classes provided by the Java Virtual Machine, plus any classes from
|
||||
JAR files present in the System Extensions directory
|
||||
(<code>$JAVA_HOME/jre/lib/ext</code>). <em>Note</em>: some JVMs may
|
||||
implement this as more than one class loader, or it may not be visible
|
||||
(as a class loader) at all.</p></li>
|
||||
<li><p><strong>System</strong> — This class loader is normally initialized
|
||||
from the contents of the <code>CLASSPATH</code> environment variable. All
|
||||
such classes are visible to both Tomcat internal classes, and to web
|
||||
applications. However, the standard Tomcat startup scripts
|
||||
(<code>$CATALINA_HOME/bin/catalina.sh</code> or
|
||||
<code>%CATALINA_HOME%\bin\catalina.bat</code>) totally ignore the contents
|
||||
of the <code>CLASSPATH</code> environment variable itself, and instead
|
||||
build the System class loader from the following repositories:
|
||||
</p>
|
||||
<ul>
|
||||
<li><p><em>$CATALINA_HOME/bin/bootstrap.jar</em> — Contains the
|
||||
main() method that is used to initialize the Tomcat server, and the
|
||||
class loader implementation classes it depends on.</p></li>
|
||||
<li><p><em>$CATALINA_BASE/bin/tomcat-juli.jar</em> or
|
||||
<em>$CATALINA_HOME/bin/tomcat-juli.jar</em> — Logging
|
||||
implementation classes. These include enhancement classes to
|
||||
<code>java.util.logging</code> API, known as Tomcat JULI,
|
||||
and a package-renamed copy of Apache Commons Logging library
|
||||
used internally by Tomcat.
|
||||
See <a href="logging.html">logging documentation</a> for more
|
||||
details.</p>
|
||||
<p>If <code>tomcat-juli.jar</code> is present in
|
||||
<em>$CATALINA_BASE/bin</em>, it is used instead of the one in
|
||||
<em>$CATALINA_HOME/bin</em>. It is useful in certain logging
|
||||
configurations</p></li>
|
||||
<li><p><em>$CATALINA_HOME/bin/commons-daemon.jar</em> — The classes
|
||||
from <a href="https://commons.apache.org/daemon/">Apache Commons
|
||||
Daemon</a> project.
|
||||
This JAR file is not present in the <code>CLASSPATH</code> built by
|
||||
<code>catalina.bat</code>|<code>.sh</code> scripts, but is referenced
|
||||
from the manifest file of <em>bootstrap.jar</em>.</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><strong>Common</strong> — This class loader contains additional
|
||||
classes that are made visible to both Tomcat internal classes and to all
|
||||
web applications.</p>
|
||||
<p>Normally, application classes should <strong>NOT</strong>
|
||||
be placed here. The locations searched by this class loader are defined by
|
||||
the <code>common.loader</code> property in
|
||||
$CATALINA_BASE/conf/catalina.properties. The default setting will search the
|
||||
following locations in the order they are listed:</p>
|
||||
<ul>
|
||||
<li>unpacked classes and resources in <code>$CATALINA_BASE/lib</code></li>
|
||||
<li>JAR files in <code>$CATALINA_BASE/lib</code></li>
|
||||
<li>unpacked classes and resources in <code>$CATALINA_HOME/lib</code></li>
|
||||
<li>JAR files in <code>$CATALINA_HOME/lib</code></li>
|
||||
</ul>
|
||||
<p>By default, this includes the following:</p>
|
||||
<ul>
|
||||
<li><em>annotations-api.jar</em> — JavaEE annotations classes.</li>
|
||||
<li><em>catalina.jar</em> — Implementation of the Catalina servlet
|
||||
container portion of Tomcat.</li>
|
||||
<li><em>catalina-ant.jar</em> — Tomcat Catalina Ant tasks.</li>
|
||||
<li><em>catalina-ha.jar</em> — High availability package.</li>
|
||||
<li><em>catalina-storeconfig.jar</em> — Generation of XML
|
||||
configuration files from current state</li>
|
||||
<li><em>catalina-tribes.jar</em> — Group communication package.</li>
|
||||
<li><em>ecj-*.jar</em> — Eclipse JDT Java compiler.</li>
|
||||
<li><em>el-api.jar</em> — EL 3.0 API.</li>
|
||||
<li><em>jasper.jar</em> — Tomcat Jasper JSP Compiler and Runtime.</li>
|
||||
<li><em>jasper-el.jar</em> — Tomcat Jasper EL implementation.</li>
|
||||
<li><em>jsp-api.jar</em> — JSP 2.3 API.</li>
|
||||
<li><em>servlet-api.jar</em> — Servlet 3.1 API.</li>
|
||||
<li><em>tomcat-api.jar</em> — Several interfaces defined by Tomcat.</li>
|
||||
<li><em>tomcat-coyote.jar</em> — Tomcat connectors and utility classes.</li>
|
||||
<li><em>tomcat-dbcp.jar</em> — Database connection pool
|
||||
implementation based on package-renamed copy of Apache Commons Pool 2
|
||||
and Apache Commons DBCP 2.</li>
|
||||
<li><em>tomcat-i18n-**.jar</em> — Optional JARs containing resource bundles
|
||||
for other languages. As default bundles are also included in each
|
||||
individual JAR, they can be safely removed if no internationalization
|
||||
of messages is needed.</li>
|
||||
<li><em>tomcat-jdbc.jar</em> — An alternative database connection pool
|
||||
implementation, known as Tomcat JDBC pool. See
|
||||
<a href="jdbc-pool.html">documentation</a> for more details.</li>
|
||||
<li><em>tomcat-util.jar</em> — Common classes used by various components of
|
||||
Apache Tomcat.</li>
|
||||
<li><em>tomcat-websocket.jar</em> — WebSocket 1.1 implementation</li>
|
||||
<li><em>websocket-api.jar</em> — WebSocket 1.1 API</li>
|
||||
</ul></li>
|
||||
<li><p><strong>WebappX</strong> — A class loader is created for each web
|
||||
application that is deployed in a single Tomcat instance. All unpacked
|
||||
classes and resources in the <code>/WEB-INF/classes</code> directory of
|
||||
your web application, plus classes and resources in JAR files
|
||||
under the <code>/WEB-INF/lib</code> directory of your web application,
|
||||
are made visible to this web application, but not to other ones.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>As mentioned above, the web application class loader diverges from the
|
||||
default Java delegation model (in accordance with the recommendations in the
|
||||
Servlet Specification, version 2.4, section 9.7.2 Web Application Classloader).
|
||||
When a request to load a
|
||||
class from the web application's <em>WebappX</em> class loader is processed,
|
||||
this class loader will look in the local repositories <strong>first</strong>,
|
||||
instead of delegating before looking. There are exceptions. Classes which are
|
||||
part of the JRE base classes cannot be overridden. There are some exceptions
|
||||
such as the XML parser components which can be overridden using the appropriate
|
||||
JVM feature which is the endorsed standards override feature for Java <= 8
|
||||
and the upgradeable modules feature for Java 9+.
|
||||
Lastly, the web application class loader will always delegate first for JavaEE
|
||||
API classes for the specifications implemented by Tomcat
|
||||
(Servlet, JSP, EL, WebSocket). All other class loaders in Tomcat follow the
|
||||
usual delegation pattern.</p>
|
||||
|
||||
<p>Therefore, from the perspective of a web application, class or resource
|
||||
loading looks in the following repositories, in this order:</p>
|
||||
<ul>
|
||||
<li>Bootstrap classes of your JVM</li>
|
||||
<li><em>/WEB-INF/classes</em> of your web application</li>
|
||||
<li><em>/WEB-INF/lib/*.jar</em> of your web application</li>
|
||||
<li>System class loader classes (described above)</li>
|
||||
<li>Common class loader classes (described above)</li>
|
||||
</ul>
|
||||
|
||||
<p>If the web application class loader is
|
||||
<a href="config/loader.html">configured</a> with
|
||||
<code><Loader delegate="true"/></code>
|
||||
then the order becomes:</p>
|
||||
<ul>
|
||||
<li>Bootstrap classes of your JVM</li>
|
||||
<li>System class loader classes (described above)</li>
|
||||
<li>Common class loader classes (described above)</li>
|
||||
<li><em>/WEB-INF/classes</em> of your web application</li>
|
||||
<li><em>/WEB-INF/lib/*.jar</em> of your web application</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="XML Parsers and Java">
|
||||
|
||||
<p>Starting with Java 1.4 a copy of JAXP APIs and an XML parser are packed
|
||||
inside the JRE. This has impacts on applications that wish to use their own
|
||||
XML parser.</p>
|
||||
|
||||
<p>In old versions of Tomcat, you could simply replace the XML parser
|
||||
in the Tomcat libraries directory to change the parser
|
||||
used by all web applications. However, this technique will not be effective
|
||||
when you are running modern versions of Java, because the usual class loader
|
||||
delegation process will always choose the implementation inside the JDK in
|
||||
preference to this one.</p>
|
||||
|
||||
<p>Java <= 8 supports a mechanism called the "Endorsed Standards Override
|
||||
Mechanism" 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. For more information, see:
|
||||
<a href="http://docs.oracle.com/javase/1.5.0/docs/guide/standards/index.html">
|
||||
http://docs.oracle.com/javase/1.5.0/docs/guide/standards/index.html</a>. For
|
||||
Java 9+, use the upgradeable modules feature.</p>
|
||||
|
||||
<p>Tomcat utilizes the endorsed mechanism by including the system property setting
|
||||
<code>-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS</code> in the
|
||||
command line that starts the container. The default value of this option is
|
||||
<em>$CATALINA_HOME/endorsed</em>. This <em>endorsed</em> directory is not
|
||||
created by default. Note that the endorsed feature is no longer supported
|
||||
with Java 9 and the above system property will only be set if either the
|
||||
directory <em>$CATALINA_HOME/endorsed</em> exists, or the variable
|
||||
<code>JAVA_ENDORSED_DIRS</code> has been set.
|
||||
</p>
|
||||
|
||||
<p>Note that overriding any JRE component carries risk. If the overriding
|
||||
component does not provide a 100% compatible API (e.g. the API provided by
|
||||
Xerces is not 100% compatible with the XML API provided by the JRE) then there
|
||||
is a risk that Tomcat and/or the deployed application will experience errors.</p>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section name="Running under a security manager">
|
||||
|
||||
<p>When running under a security manager the locations from which classes
|
||||
are permitted to be loaded will also depend on the contents of your policy
|
||||
file. See <a href="security-manager-howto.html">Security Manager How-To</a>
|
||||
for further information.</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="Advanced configuration">
|
||||
|
||||
<p>A more complex class loader hierarchy may also be configured. See the diagram
|
||||
below. By default, the <strong>Server</strong> and <strong>Shared</strong>
|
||||
class loaders are not defined and the simplifed hierarchy shown above is used.
|
||||
This more complex hierarchy may be use by defining values for the
|
||||
<code>server.loader</code> and/or <code>shared.loader</code> properties in
|
||||
<code>conf/catalina.properties</code>.</p>
|
||||
|
||||
<source>
|
||||
Bootstrap
|
||||
|
|
||||
System
|
||||
|
|
||||
Common
|
||||
/ \
|
||||
Server Shared
|
||||
/ \
|
||||
Webapp1 Webapp2 ...</source>
|
||||
|
||||
<p>The <strong>Server</strong> class loader is only visible to Tomcat internals
|
||||
and is completely invisible to web applications.</p>
|
||||
|
||||
<p>The <strong>Shared</strong> class loader is visible to all web applications
|
||||
and may be used to shared code across all web applications. However, any updates
|
||||
to this shared code will require a Tomcat restart.</p>
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
</document>
|
||||