| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
| "http://www.w3.org/TR/html4/loose.dtd"> | |
| <!-- | |
| 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 http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |
| <meta name="Author" content="Malcolm Edgar"/> | |
| <meta name="description" lang="en" content="Apache Click Java web application framework"/> | |
| <meta name="keywords" lang="en" content="Apache Click, Click Framework, Java, JEE, J2EE, web application framework, open source"/> | |
| <title>Apache Click</title> | |
| <link rel="stylesheet" type="text/css" href="../help.css"/> | |
| <link rel="stylesheet" type="text/css" href="../syntax-highlighter.css"/> | |
| </head> | |
| <script type="text/javascript" src="../syntax-highlighter.js"></script> | |
| <!--Activate syntax highlighting--> | |
| <body onload="prettyPrint();"> | |
| <h1>Click DTD Example</h1> | |
| Provides an example of all <a href="click-dtd.html">DTD</a> ELEMENTS and ATTRIBUTES: | |
| <pre class="prettyprint"> | |
| <!-- A Click Application (click.xml) Example. --> | |
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <click-app charset="UTF-8" locale="en"> | |
| <!-- A automatically mapped Page package. Note automapping and autobinding is true by default --> | |
| <pages package="com.mycorp.banking.page" automapping="true" autobinding="true"> | |
| <!-- A custom mapped Page --> | |
| <page path="index.htm" classname="com.mycorp.page.Home"/> | |
| <!-- Another mapped Page with custom headers --> | |
| <page path="login.htm" classname="com.mycorp.page.Login"> | |
| <!-- Specify headers to cache the page for 1 hour, after which it should be reloaded --> | |
| <header name="Pragma" value="no-cache"/> | |
| <header name="Expires" value="1" type="Date"/> | |
| </page> | |
| </pages> | |
| <!-- Another automatically mapped Page package --> | |
| <pages package="com.mycorp.common.page"/> | |
| <!-- Setup global headers. The headers shown below is the default used by Click --> | |
| <headers> | |
| <header name="Pragma" value="no-cache"/> | |
| <header name="Cache-Control" | |
| value="no-store, no-cache, must-revalidate, post-check=0, pre-check=0"/> | |
| <header name="Expires" value="1" type="Date"/> | |
| </headers> | |
| <!-- Setup alternative Format. Default Format is org.apache.click.util.Format --> | |
| <format classname="com.mycorp.util.Format"/> | |
| <!-- Mode values include: [production], [profile], [development], [debug], [trace] --> | |
| <mode value="production"/> | |
| <!-- Set Click internal Logger to Log4J instead of the default ConsoleLogService --> | |
| <log-service classname="org.apache.click.extras.service.Log4JLogService"/> | |
| <!-- Set the template engine to use Freemarker instead of Velocity --> | |
| <template-service classname="org.apache.click.extras.service.FreemarkerTemplateService"/> | |
| <!-- Set the org.apache.click.service.CommonsFileUploadService properties: sizeMax and fileSizeMax. --> | |
| <file-upload-service> | |
| <!-- Set the total request maximum size to 10mb (10 x 1024 x 1024 = 10485760). The default request upload size is unlimited. --> | |
| <property name="sizeMax" value="10485760"/> | |
| <!-- Set the maximum individual file size to 2mb (2 x 1024 x 1024 = 2097152). The default file upload size is unlimited. --> | |
| <property name="fileSizeMax" value="2097152"/> | |
| </file-upload-service> | |
| <!-- | |
| The commented section below shows how to use the 'classname' attribute to specify | |
| a custom org.apache.click.service.FileUploadService implementation. | |
| --> | |
| <!-- | |
| <file-upload-service classname="com.mycorp.util.CustomFileUploadService"> | |
| <property name="sizeMax" value="10485760"/> | |
| <property name="fileSizeMax" value="2097152"/> | |
| </file-upload-service> | |
| --> | |
| <!-- List controls which will deploy their resources on application startup --> | |
| <controls> | |
| <control classname="org.apache.click.examples.control.FilterPanel"/> | |
| <!-- A control-set which refers to a third-party xml file specifying the list of controls to deploy --> | |
| <control-set name="mycorp-third-party-controls.xml"/> | |
| <!-- Example mycorp-third-party-controls.xml file --> | |
| <!-- | |
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <click-app> | |
| <controls> | |
| <control classname="com.mycorp.control.MyCorpTable"/> | |
| <control classname="com.mycorp.control.MyCorpForm"/> | |
| </controls> | |
| </click-app> | |
| --> | |
| </controls> | |
| </click-app> | |
| </pre> | |
| </body> | |
| </html> | |