Blame | Last modification | View Log | Download | RSS feed
<?xml version="1.0" encoding="UTF-8"?><!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements. See the NOTICE file distributed withthis 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 withthe License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.--><!DOCTYPE web-appPUBLIC "-//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 performa wild and wonderful task, based on servlets andJSP pages. It was written by Dave Developer(dave@mycompany.com), who should be contacted formore information.</description><!-- Context initialization parameters that define sharedString constants used within your application, whichcan be customized by the system administrator who isinstalling your application. The values actuallyassigned to these parameters can be retrieved in aservlet or JSP page by calling:String value =getServletContext().getInitParameter("name");where "name" matches the <param-name> element ofone of these initialization parameters.You can define any number of context initializationparameters, including zero.--><context-param><param-name>webadmin</param-name><param-value>myaddress@mycompany.com</param-value><description>The EMAIL address of the administrator to whom questionsand comments about this application should be addressed.</description></context-param><!-- Servlet definitions for the servlets that make upyour web application, including initializationparameters. With Tomcat, you can also send requeststo 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 alsomakes relative references to images and other resourcesrequired by your servlet more complicated, so definingall of your servlets (and defining a mapping to them witha servlet-mapping element) is recommended.Servlet initialization parameters can be retrieved in aservlet or JSP page by calling:String value =getServletConfig().getInitParameter("name");where "name" matches the <param-name> element ofone 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 architectureused in this application. It is generally mapped to the ".do"filename extension with a servlet-mapping element, and all formsubmits 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 thefilename extension is removed). The corresponding value is thename 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 generatedgraphs, 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 totranslate a particular request URI (context-relative) to aparticular servlet. The examples below correspond to theservlet descriptions above. Thus, a request URI like:http://localhost:8080/{contextpath}/graphwill be mapped to the "graph" servlet, while a request like:http://localhost:8080/{contextpath}/saveCustomer.dowill 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 sameservlet, 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 modifythe timeout for a particular session dynamically by usingHttpSession.getMaxInactiveInterval(). --><session-config><session-timeout>30</session-timeout> <!-- 30 minutes --></session-config></web-app>