Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
771 blopes 1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
  Licensed to the Apache Software Foundation (ASF) under one or more
4
  contributor license agreements.  See the NOTICE file distributed with
5
  this work for additional information regarding copyright ownership.
6
  The ASF licenses this file to You under the Apache License, Version 2.0
7
  (the "License"); you may not use this file except in compliance with
8
  the License.  You may obtain a copy of the License at
9
 
10
      http://www.apache.org/licenses/LICENSE-2.0
11
 
12
  Unless required by applicable law or agreed to in writing, software
13
  distributed under the License is distributed on an "AS IS" BASIS,
14
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
  See the License for the specific language governing permissions and
16
  limitations under the License.
17
-->
18
 
19
<!DOCTYPE web-app
20
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
21
    "http://java.sun.com/dtd/web-app_2_3.dtd">
22
 
23
<web-app>
24
 
25
 
26
    <!-- General description of your web application -->
27
 
28
    <display-name>My Web Application</display-name>
29
    <description>
30
      This is version X.X of an application to perform
31
      a wild and wonderful task, based on servlets and
32
      JSP pages.  It was written by Dave Developer
33
      (dave@mycompany.com), who should be contacted for
34
      more information.
35
    </description>
36
 
37
 
38
    <!-- Context initialization parameters that define shared
39
         String constants used within your application, which
40
         can be customized by the system administrator who is
41
         installing your application.  The values actually
42
         assigned to these parameters can be retrieved in a
43
         servlet or JSP page by calling:
44
 
45
             String value =
46
               getServletContext().getInitParameter("name");
47
 
48
         where "name" matches the <param-name> element of
49
         one of these initialization parameters.
50
 
51
         You can define any number of context initialization
52
         parameters, including zero.
53
    -->
54
 
55
    <context-param>
56
      <param-name>webadmin</param-name>
57
      <param-value>myaddress@mycompany.com</param-value>
58
      <description>
59
        The EMAIL address of the administrator to whom questions
60
        and comments about this application should be addressed.
61
      </description>
62
    </context-param>
63
 
64
 
65
    <!-- Servlet definitions for the servlets that make up
66
         your web application, including initialization
67
         parameters.  With Tomcat, you can also send requests
68
         to servlets not listed here with a request like this:
69
 
70
           http://localhost:8080/{context-path}/servlet/{classname}
71
 
72
         but this usage is not guaranteed to be portable.  It also
73
         makes relative references to images and other resources
74
         required by your servlet more complicated, so defining
75
         all of your servlets (and defining a mapping to them with
76
         a servlet-mapping element) is recommended.
77
 
78
         Servlet initialization parameters can be retrieved in a
79
         servlet or JSP page by calling:
80
 
81
             String value =
82
               getServletConfig().getInitParameter("name");
83
 
84
         where "name" matches the <param-name> element of
85
         one of these initialization parameters.
86
 
87
         You can define any number of servlets, including zero.
88
    -->
89
 
90
    <servlet>
91
      <servlet-name>controller</servlet-name>
92
      <description>
93
        This servlet plays the "controller" role in the MVC architecture
94
        used in this application.  It is generally mapped to the ".do"
95
        filename extension with a servlet-mapping element, and all form
96
        submits in the app will be submitted to a request URI like
97
        "saveCustomer.do", which will therefore be mapped to this servlet.
98
 
99
        The initialization parameter names for this servlet are the
100
        "servlet path" that will be received by this servlet (after the
101
        filename extension is removed).  The corresponding value is the
102
        name of the action class that will be used to process this request.
103
      </description>
104
      <servlet-class>com.mycompany.mypackage.ControllerServlet</servlet-class>
105
      <init-param>
106
        <param-name>listOrders</param-name>
107
        <param-value>com.mycompany.myactions.ListOrdersAction</param-value>
108
      </init-param>
109
      <init-param>
110
        <param-name>saveCustomer</param-name>
111
        <param-value>com.mycompany.myactions.SaveCustomerAction</param-value>
112
      </init-param>
113
      <!-- Load this servlet at server startup time -->
114
      <load-on-startup>5</load-on-startup>
115
    </servlet>
116
 
117
    <servlet>
118
      <servlet-name>graph</servlet-name>
119
      <description>
120
        This servlet produces GIF images that are dynamically generated
121
        graphs, based on the input parameters included on the request.
122
        It is generally mapped to a specific request URI like "/graph".
123
      </description>
124
    </servlet>
125
 
126
 
127
    <!-- Define mappings that are used by the servlet container to
128
         translate a particular request URI (context-relative) to a
129
         particular servlet.  The examples below correspond to the
130
         servlet descriptions above.  Thus, a request URI like:
131
 
132
           http://localhost:8080/{contextpath}/graph
133
 
134
         will be mapped to the "graph" servlet, while a request like:
135
 
136
           http://localhost:8080/{contextpath}/saveCustomer.do
137
 
138
         will be mapped to the "controller" servlet.
139
 
140
         You may define any number of servlet mappings, including zero.
141
         It is also legal to define more than one mapping for the same
142
         servlet, if you wish to.
143
    -->
144
 
145
    <servlet-mapping>
146
      <servlet-name>controller</servlet-name>
147
      <url-pattern>*.do</url-pattern>
148
    </servlet-mapping>
149
 
150
    <servlet-mapping>
151
      <servlet-name>graph</servlet-name>
152
      <url-pattern>/graph</url-pattern>
153
    </servlet-mapping>
154
 
155
 
156
    <!-- Define the default session timeout for your application,
157
         in minutes.  From a servlet or JSP page, you can modify
158
         the timeout for a particular session dynamically by using
159
         HttpSession.getMaxInactiveInterval(). -->
160
 
161
    <session-config>
162
      <session-timeout>30</session-timeout>    <!-- 30 minutes -->
163
    </session-config>
164
 
165
 
166
</web-app>