tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r545761 - in /tapestry/tapestry5/trunk/tapestry-tutorial1: ./ .settings/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tapestry/ src/main/java/org/apache/tapestry/tutorial/ src/main/java...
Date Sat, 09 Jun 2007 15:33:22 GMT
Author: hlship
Date: Sat Jun  9 08:33:19 2007
New Revision: 545761

URL: http://svn.apache.org/viewvc?view=rev&rev=545761
Log:
TAPESTRY-1439: Convert Tutorial from Pages/PDF to new module using APT format

Added:
    tapestry/tapestry5/trunk/tapestry-tutorial1/.classpath
    tapestry/tapestry5/trunk/tapestry-tutorial1/.project
    tapestry/tapestry5/trunk/tapestry-tutorial1/.settings/
    tapestry/tapestry5/trunk/tapestry-tutorial1/LICENSE-2.0.txt
    tapestry/tapestry5/trunk/tapestry-tutorial1/NOTICE.txt
    tapestry/tapestry5/trunk/tapestry-tutorial1/pom.xml
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/pages/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/pages/Start.java
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/resources/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/resources/log4j.properties
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/Start.html
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/web.xml
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/favicon.ico   (with props)
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/env.apt
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/index.apt
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import-folder.png   (with props)
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import.png   (with props)
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/startpage.png   (with props)
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/site.xml
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/java/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/java/PLACEHOLDER
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/resources/
    tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/resources/PLACEHOLDER
Modified:
    tapestry/tapestry5/trunk/tapestry-tutorial1/   (props changed)

Propchange: tapestry/tapestry5/trunk/tapestry-tutorial1/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Jun  9 08:33:19 2007
@@ -0,0 +1,2 @@
+bin
+target

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/.classpath
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/.classpath?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/.classpath (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/.classpath Sat Jun  9 08:33:19 2007
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="lib" path="src/main/resources"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry kind="lib" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/.project
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/.project?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/.project (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/.project Sat Jun  9 08:33:19 2007
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>tapestry-tutorial1</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/LICENSE-2.0.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/LICENSE-2.0.txt?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/LICENSE-2.0.txt (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/LICENSE-2.0.txt Sat Jun  9 08:33:19 2007
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/NOTICE.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/NOTICE.txt?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/NOTICE.txt (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/NOTICE.txt Sat Jun  9 08:33:19 2007
@@ -0,0 +1,3 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/pom.xml?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/pom.xml (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/pom.xml Sat Jun  9 08:33:19 2007
@@ -0,0 +1,124 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.tapestry</groupId>
+    <artifactId>tutorial1</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>war</packaging>
+    <name>Tapestry 5 Tutorial</name>
+    <description>Introductory topics in Tapestry application development.</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tapestry</groupId>
+            <artifactId>tapestry-core</artifactId>
+            <version>${tapestry-release-version}</version>
+        </dependency>
+        
+        <!-- This can be removed if not desired. Tapestry uses commons-logging, not Log4J explicitly.
+             However, if Log4J is not on the classpath, commons-logging tends to use its own internal
+             logging which is not very configurable.  This project includes a log4j.properties file
+             to configure output. -->
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.9</version>
+        </dependency>
+
+        <!-- A dependency on either JUnit or TestNG is required, or the surefire plugin (which runs the tests)
+             will fail, preventing Maven from packaging the WAR. Tapestry includes a large number
+             of testing facilities designed for use with TestNG (http://testng.org/), so it's recommended. -->
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>5.1</version>
+            <classifier>jdk15</classifier>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+    <build>
+        <finalName>tapestry-tutorial1</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                    <optimize>true</optimize>
+                </configuration>
+            </plugin>
+
+            <!-- Run the application using "mvn jetty:run" -->
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+                <configuration>
+                    <!-- Log to the console. -->
+                    <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
+                        <!-- This doesn't do anything for Jetty, but is a workaround for a Maven bug
+                             that prevents the requestLog from being set. -->
+                        <append>true</append>
+                    </requestLog>
+                </configuration>
+            </plugin>
+
+
+            <!-- This changes the WAR file packaging so that what would normally go into WEB-INF/classes
+             is instead packaged as WEB-INF/lib/tutorial1.jar.  This is necessary for Tapestry
+             to be able to search for page and component classes at startup. Only
+             certain application servers require this configuration, please see the documentation
+             at the Tapestry 5 project page (http://tapestry.apache.org/tapestry5/). -->
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <archiveClasses>true</archiveClasses>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+    <reporting>
+        
+        <!-- Adds a report detailing the components, mixins and base classes defined by this module. -->        
+        <plugins>
+            <plugin>
+                <groupId>org.apache.tapestry</groupId>
+                <artifactId>tapestry-component-report</artifactId>
+                <version>${tapestry-release-version}</version>
+                <configuration>
+                    <rootPackage>org.apache.tapestry.tutorial</rootPackage>
+                </configuration>
+            </plugin>
+        </plugins>
+    </reporting>
+
+  <repositories>
+    <repository>
+      <id>codehaus.snapshots</id>
+      <url>http://snapshots.repository.codehaus.org</url>
+    </repository>
+    <!-- For access to the selenium JARs. -->
+    <repository>
+      <id>openqa</id>
+      <name>OpenQA Maven Repository</name>
+      <url>http://maven.openqa.org/</url>
+    </repository>
+  </repositories>
+  
+  <pluginRepositories>
+    <!-- A necessary version of the surefire plugin, 2.8-SNAPSHOT, lives here. -->
+    <pluginRepository>
+      <id>howardlewisship.com</id>
+      <url>http://howardlewisship.com/repository</url>
+    </pluginRepository>
+  </pluginRepositories>
+  
+
+    <properties>
+        <tapestry-release-version>5.0.5-SNAPSHOT</tapestry-release-version>
+    </properties>
+</project>

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/pages/Start.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/pages/Start.java?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/pages/Start.java (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/pages/Start.java Sat Jun  9 08:33:19 2007
@@ -0,0 +1,14 @@
+package org.apache.tapestry.tutorial.pages;
+
+import java.util.Date;
+
+/**
+ * Start page of application tutorial1.
+ */
+public class Start
+{
+	public Date getCurrentTime() 
+	{ 
+		return new Date(); 
+	}
+}
\ No newline at end of file

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java Sat Jun  9 08:33:19 2007
@@ -0,0 +1,82 @@
+package org.apache.tapestry.tutorial.services;
+
+import java.io.IOException;
+
+import org.apache.commons.logging.Log;
+import org.apache.tapestry.ioc.MappedConfiguration;
+import org.apache.tapestry.ioc.OrderedConfiguration;
+import org.apache.tapestry.ioc.annotations.InjectService;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.RequestFilter;
+import org.apache.tapestry.services.RequestHandler;
+import org.apache.tapestry.services.Response;
+
+/**
+ * This module is automatically included as part of the Tapestry IoC Registry, it's a good place to
+ * configure and extend Tapestry, or to place your own services.
+ */
+public class AppModule
+{
+    public static void contributeApplicationDefaults(
+            MappedConfiguration<String, String> configuration)
+    {
+        // Contributions to ApplicationDefaults will override any contributions to
+        // FactoryDefaults (with the same key). Here we're restricting the supported
+        // locales to just "en" (English). As you add localised message catalogs and other assets,
+        // you can extend this list of locales (it's a comma seperated series of locale names;
+        // the first locale name is the default when there's no reasonable match).
+        
+        configuration.add("tapestry.supported-locales", "en");
+    }
+    
+
+    /**
+     * This is a service definition, the service will be named TimingFilter. The interface,
+     * RequestFilter, is used within the RequestHandler service pipeline, which is built from the
+     * RequestHandler service configuration. Tapestry IoC is responsible for passing in an
+     * appropriate Log instance. Requests for static resources are handled at a higher level, so
+     * this filter will only be invoked for Tapestry related requests.
+     */    
+    public RequestFilter buildTimingFilter(final Log log)
+    {
+        return new RequestFilter()
+        {
+            public boolean service(Request request, Response response, RequestHandler handler)
+                    throws IOException
+            {
+                long startTime = System.currentTimeMillis();
+
+                try
+                {
+                    // The reponsibility of a filter is to invoke the corresponding method
+                    // in the handler. When you chain multiple filters together, each filter
+                    // received a handler that is a bridge to the next filter.
+                    
+                    return handler.service(request, response);
+                }
+                finally
+                {
+                    long elapsed = System.currentTimeMillis() - startTime;
+
+                    log.info(String.format("Request time: %d ms", elapsed));
+                }
+            }
+        };
+    }
+
+    /**
+     * This is a contribution to the RequestHandler service configuration. This is how we extend
+     * Tapestry using the timing filter. A common use for this kind of filter is transaction
+     * management or security.
+     */
+    public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration,
+            @InjectService("TimingFilter")
+            RequestFilter filter)
+    {
+        // Each contribution to an ordered configuration has a name, When necessary, you may
+        // set constraints to precisely control the invocation order of the contributed filter
+        // within the pipeline.
+        
+        configuration.add("Timing", filter);
+    }
+}

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/resources/log4j.properties?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/resources/log4j.properties (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/resources/log4j.properties Sat Jun  9 08:33:19 2007
@@ -0,0 +1,21 @@
+log4j.rootCategory=WARN, A1
+
+# A1 is set to be a ConsoleAppender. 
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=[%p] %c{1} %m%n
+
+log4j.category.org.apache.tapestry.TapestryFilter=info
+log4j.category.org.apache.tapestry=error
+log4j.category.tapestry=error
+
+log4j.category.org.apache.tapestry.tutorial=error
+log4j.category.app=error
+log4j.category.app.TimingFilter=info
+
+# Turning on debug mode for a page or component will show all of the code changes that occur when the
+# class is loaded.  Turning on debug mode for a page will enable verbose output about rendering
+# the page (and its components).
+# log4j.category.org.apache.tapestry.tutorial.pages.Start=debug

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/Start.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/Start.html?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/Start.html (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/Start.html Sat Jun  9 08:33:19 2007
@@ -0,0 +1,18 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+    <head>
+        <title>tutorial1 Start Page</title>
+    </head>
+    <body>
+        <h1>tutorial1 Start Page</h1>
+
+        <p> This is the start page for this application, a good place to start your modifications.
+            Just to prove this is live: </p>
+
+        <p> The current time is: ${currentTime}. </p>
+
+
+        <p>
+            [<t:pagelink t:page="Start">refresh</t:pagelink>]
+        </p>
+    </body>
+</html>

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/web.xml?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/web.xml (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/WEB-INF/web.xml Sat Jun  9 08:33:19 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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>
+          <display-name>Tapestry 5 Tutorial #1</display-name>
+          <context-param>
+              <!-- The only significant configuration for Tapestry 5, this informs Tapestry
+                   of where to look for pages, components and mixins. -->
+              <param-name>tapestry.app-package</param-name>
+              <param-value>org.apache.tapestry.tutorial</param-value>
+          </context-param>
+          <filter>
+              <filter-name>app</filter-name>
+              <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
+          </filter>
+          <filter-mapping>
+              <filter-name>app</filter-name>
+              <url-pattern>/*</url-pattern>
+          </filter-mapping>
+      </web-app>
+      
\ No newline at end of file

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/favicon.ico
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/favicon.ico?view=auto&rev=545761
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/webapp/favicon.ico
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/env.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/env.apt?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/env.apt (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/env.apt Sat Jun  9 08:33:19 2007
@@ -0,0 +1,65 @@
+ ---
+ Setting up your Environment
+ ---
+ 
+Setting Up Your Environment
+
+ As much as I would like to dive into Tapestry right now, we must first talk about your development environment. The joy and the pain of Java development is the volume of choice available. There's just a bewildering number of JDKs, IDEs and other TLA1s out there.
+
+ Let's talk about a stack of tools, all open source and freely available, that you'll need to setup. Likely you have some of these, or some version of these, already on your development machine.
+
+* JDK 1.5
+
+  Tapestry 5 makes use of features of JDK 1.5.  This includes Java Annotations, and a little bit of Java Generics.
+  
+* Eclipse 3.2
+
+  Since we're emphasizing a free and open source stack, we'll concentrate on the best free IDE.
+  
+* XMLBuddy
+
+  A free (even if closed source) and reasonably powerful XML editor that will be useful for editing Tapestry component templates.
+    
+  XMLBuddy is a product of Bocaloco Software ({{{http://xmlbuddy.com/}http://xmlbuddy.com/}}) and comes in both free and commercial editions.  Installation directions are available on the site.
+  
+  XMLBuddy is just a suggestion, you are free to use whatever XML editor suits your needs, or a plain text editor if your are comfortable with that.
+  
+* Jetty 5.1
+
+  Jetty is an open source servlet container created by Greg Wilkins of Webtide (which offers commercial support for Jetty). Jetty is high performance and designed for easy embedding in other software.
+   We choose the 5.1 release, rather than the cutting edge Jetty 6, because it is compatible with Jetty Launcher (see below).
+   
+  You can find out more about Jetty from its home page: {{{http://mortbay.org}http://mortbay.org}}.
+  
+  You can download Jetty from {{{http://docs.codehaus.org/display/JETTY/Downloading+and+Installing}http://docs.codehaus.org/display/JETTY/Downloading+and+Installing}}.
+  
+* Jetty Launcher
+
+  Jetty Launcher is a plugin for Eclipse that makes it easy to launch Jetty applications from within Eclipse. This is a great model, since you can run or debug directly from you workspace without wasting time packaging and deploying.
+  
+  Jetty Launcher was created by Geoff Longman, and is available from http://jettylauncher.sourceforge.net/. Installation is easy, simply point Eclipse's update manager at 
+  {{{http://jettylauncher.sourceforge.net/updates/}http://jettylauncher.sourceforge.net/updates/}}.
+  
+  <<Caution: JettyLauncher is only compatible with Jetty 4 and Jetty 5. It does not work with Jetty 6.>>
+  
+* Maven 2.0.5
+
+  Maven is a software build tool of rather epic ambitions. It has a very sophisticated plugin system that allows it to do virtually anything, though compiling Java code, building WAR and JAR files, and creating reports and web sites are its forte.
+  
+  Perhaps the biggest advantage of Maven over, say, Ant, is that it can download project dependencies (such as the Tapestry JAR files, and the JAR files Tapestry itself depends on) automatically for you, from one of several central repositories.
+  
+  We'll be using Maven to set up our Tapestry applications.  Maven 2.0.5 is available from {{{http://maven.apache.org/download.html}http://maven.apache.org/download.html}}.
+  
+* Maven Plugin
+
+  The Maven Plugin for Eclipse integrates Maven and Eclipse. It includes some features for editting the pom.xml (the Maven project description file which identifies, among many other things, what JAR files are needed by the project). 
+  More importantly, a Maven-enabled project automatically stays synchronized with the POM, automatically linking Eclipse project classpath to files from the local Maven repository.
+  
+  The plugin is available by pointing the Eclipse update manager at {{{http://m2eclipse.codehaus.org/update/}http://m2eclipse.codehaus.org/update/}}.  Make sure to use version 0.0.9 (newer versions have had stability issues).
+  
+* Tapestry 5.0.5
+
+  You should not have to download this directly; as we'll see, Maven should take care of downloading Tapestry, and its dependencies, as needed.
+  
+  <<Caution: this book is being written in parallel with Tapestry 5. In some cases, the screenshots may not be entirely accurate and the version number for Tapestry is in flux, with snapshot releases occurring frequently, and new dot releases every few weeks. 
+  So, for example, is 5.0.5 is not available, you can use 5.0.4 instead.>>
\ No newline at end of file

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt Sat Jun  9 08:33:19 2007
@@ -0,0 +1,257 @@
+ ---
+ Creating your First Tapestry Application
+ ---
+ 
+Creating your First Tapestry Application
+
+  Before we can get down to the fun, we have to create an empty application.  Tapestry uses a feature of Maven to do this: <<archetypes>> (a too-clever way of saying "project templates").
+  
+  What we'll do is create an empty shell application using Maven, then import the application into Eclipse to do the rest of the work.
+    
+  Before proceeding, we have to decide on three things:  A Maven <group id> and <artifact id> for our project and a <root package name>. 
+  
+  Maven uses the group id and artifact id to provide a unique identity for the application, and Tapestry needs to have a base package name so it knows where to look for pages and components.
+  
+  For this example, we'll use the group id <<org.apache.tapestry>> and the artifact id <<tapestry-tutorial1>>, and we'll use <<org.apache.tapestry.tutorial>> as the base package.
+  
+  Our final command line is thus:
+
+----
+mvn archetype:create
+  -DarchetypeGroupId=org.apache.tapestry
+  -DarchetypeArtifactId=quickstart
+  -DarchetypeVersion=5.0.5
+  -DgroupId=org.apache.tapestry
+  -DartifactId=tapestry-tutorial1
+  -DpackageName=org.apache.tapestry.tutorial
+----
+
+  We've shown this as several lines, but it would normally be entered as a single long line.
+  
+  As a command, it's quite a doozy!  If you are going to create lots of projects, creating a wrapper script for this is a smart idea.
+  
+  Execute this in a temporary directory, it will create a sub-directory: tapestry-tutorial1.
+    
+  The first time you execute this command, Maven will spend quite a while downloading all kinds of JARs into
+  your local repository, which can take a minute or more. Later, once all that is already available locally,
+  the whole command executes in under a second.
+  
+  One of the first things you can do is use Maven to run Jetty directly.
+  
+  Change into the newly created directory, and execute the command:
+  
+---
+mvn jetty:run
+---
+
+  Again, the first time, there's a dizzying number of downloads, but before you know it, the Jetty servlet container
+  is up and running.
+  
+  You can open a web browser to {{{http://localhost:8080/tutorial1/}http://localhost:8080/tutorial1/}} to see the running application:
+  
+[startpage.png] Default Start page for Application
+
+  The date and time in the middle of the page proves that this is a live application.
+  
+  Let's look at what Maven has generated for us. To do this, we're going to load the project inside Eclipse and continue from there.
+  
+  Start by hitting Control-C in the Terminal window to close down Jetty..
+  
+  Launch Eclipse and switch over to the Java Browser Perspective.
+  
+  Right click inside the Projects view and select <<Import ...>>
+  
+  Choose the "existing projects" option:
+  
+[eclipse-import.png] Import Project into Eclipse
+
+  Now select the folder created by Maven:
+  
+[eclipse-import-folder.png] Select folder to import
+
+  When you click the Finish button, the project will be imported into the Eclipse workspace.
+  
+  <<TODO: Picture of Java Browsing Perspective>>
+  
+  Maven dictates the layout of the project:
+  
+  * Java source files under src/main/java
+  
+  * Web application files under src/main/webapp (including src/main/webapp/WEB-INF)
+  
+  * Java test sources under src/test/java
+  
+  * Non-code resources under src/main/resources and src/test/resources
+  
+  []
+  
+  (Tapestry users a number of non-code resources, such as template files and message catalogs, which will ultimately be packaged into
+  the WAR file.)
+  
+  The Maven Plugin, inside Eclipse, has found all the referenced libraries in your local Maven repository, and compiled the two cleasses created by quickstart archetype.
+  
+  Let's look at what the archetype has created for us, starting with the web.xml file:
+  
+  <<src/main/webapp/WEB-INF/web.xml>>
+  
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<!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>
+          <display-name>tutorial1 Tapestry 5 Application</display-name>
+          <context-param>
+              <!-- The only significant configuration for Tapestry 5, this informs Tapestry
+                   of where to look for pages, components and mixins. -->
+              <param-name>tapestry.app-package</param-name>
+              <param-value>org.apache.tapestry.tutorial</param-value>
+          </context-param>
+          <filter>
+              <filter-name>app</filter-name>
+              <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
+          </filter>
+          <filter-mapping>
+              <filter-name>app</filter-name>
+              <url-pattern>/*</url-pattern>
+          </filter-mapping>
+      </web-app>
+----
+  
+  This is short and sweet: ou can see that the package name you provided earlier shows up as the tapestry.app-package context parameter; the TapestryFilter instance will use
+  this information to locate the Java classes we'll look at next.
+  
+  Tapestry 5 operates as a <servlet filter> rather than as a traditional <servlet>. In this way, Tapestry has a chance to intercept all incoming requests, to determine
+  which ones apply to Tapestry pages (or other resources). The net effect is that you don't have to maintain any additional configuration
+  for Tapestry to operate, regardless of how many pages or components you add to your application.
+  
+  Tapestry has a special case for a URL that specifies the host and the context ("/tutorial1" in this case) but nothing else ... it renders
+  the Start page of the application. In this case, Start is the only page in the application. Let's see what it looks like.
+  
+  Tapestry pages minimally consist of an ordinary Java class plus a component template file.
+  
+  Let's start with the template, which is stored as src/main/webapp/WEB-INF/Start.html.  Tapestry component templates are well-formed XML documents.  This means that you can use
+  any available XML editor.  Templates may even have a DOCTYPE or an XML schema to validate the structure of the template.  <That is, your build process may use a tool to validate your
+  templates.  At runtime, when Tapestry reads the template, it does not use a validating parser.> For the most part, the template looks like
+  ordinary XHTML:
+  
+  <<src/main/webapp/WEB-INF/Start.html>>
+  
+----
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+    <head>
+        <title>tutorial1 Start Page</title>
+    </head>
+    <body>
+        <h1>tutorial1 Start Page</h1>
+
+        <p> This is the start page for this application, a good place to start your modifications.
+            Just to prove this is live: </p>
+
+        <p> The current time is: ${currentTime}. </p>
+
+
+        <p>
+            [<t:pagelink t:page="Start">refresh</t:pagelink>]
+        </p>
+    </body>
+</html>
+----
+
+ The goal in Tapestry is for component templates, such as Start.html, to look as much as possibly like ordinary, static
+ HTML files. <By static, we man unchanging, as opposed to a dynamically generated Tapestry page.>  In fact, the expectation
+ is that in many cases, the templates will start as static HTML files, created by a web developer and then be
+ <instrumented> to act as live Tapestry pages.
+ 
+  Tapestry hides non-standard element and attributes inside the XML namespace. By convention, the prefix "t:" is used for
+  this namespace, but that is not a requirement.
+  
+  There only two bits of Tapestry instrumentation on this page.
+  
+  First is the way we display the current date and time: <<<$\{currentTime}>>>.  This syntax is used to access a property
+  of the page object, a property named currentTime.  Tapestry class this an <expansion>.  The value inside the braces is the name of a 
+  standard JavaBeans property supplied by the page. As we'll see in later chapters, this is just the tip of the iceber for what is possible
+  using expansions.
+  
+  The other item is the link used to refresh the page. We're specifying a component as an XML <element> within the Tapestry namespace. The element name, "pagelink",
+  defines the type of component.  PageLink (Tapestry is case insensitive) is a component built into the framework; it is part of the
+  core component library.  The attribute, page, is a string - the name of the page to link to.  Here, we're linking back to the same page, page "Start".
+  
+  This is how Tapestry works; the Start page contains an <instance> of the PageLink component. The PageLink component is configured via its parameters, which controls what
+  it does and how it behaves.
+  
+  The URL that the PageLink component will render out is <<<http://localhost:8080/tutorial1/start>>>.  Tapestry is case insensitive
+  <<<http://localhost:8080/tutorial1/START>>> would work just as well), and generates lower-case URLs because those are more visually pleasing. <The servlet container
+  is not so forgiving, and expects an exact match on the context name portion of the URL: "/tutorial1".>
+  
+  Tapestry ignores case where ever it can. Inside the template, we configured the PageLink component's page parameter with the name of the page, "Start".  Here too we could be
+  inexact on case.  Feel free to use "start" if that works for you. 
+  
+  <You do have to name your component template file, Start.html, with the exact same case as the component class name, Start. If you get the case wrong, it may work on some
+  operating systems (such as Windows) and not on others (Mac OS X, Linux, and most others). This can be really vexing, as it is common to develop on Windows and deploy on Linux or
+  Solaris, so be careful about case in this one area.>
+  
+  Clicking the link in the web browser sends a requst to re-render the page; the template and Java object are
+  re-used to generate the HTML sent to the browser, which results in the updated time showing up in the web browser.
+  
+  The final piece of the puzzle is the Java class for the page.  Tapestry has very specific rules for where page classes go.  Remember the package name?  Tapestry adds a
+  sub-package, "pages", to it and the Java class goes there. Thus the full Java class name is org.apache.tapestry.tutorial.pages.Start.
+  
+  <<src/main/java/org/apache/tapestry/tutorial/pages/Start.java>>
+  
+---
+package org.apache.tapestry.tutorial.pages;
+
+import java.util.Date;
+
+/**
+ * Start page of application tutorial1.
+ */
+public class Start
+{
+	public Date getCurrentTime() 
+	{ 
+		return new Date(); 
+	}
+}
+---
+  
+  That's pretty darn simple: No classes to extend, no interfaces to implement, just a very pure POJO (Plain Old Java Object). You do have to mee the Tapestry framework
+  halfway:
+  
+  * You need to put the Java class in the expected package, org.apache.tapestry.tutorial.pages
+  
+  * The class must be public
+  
+  * You need to make sure there's a public, no-arguments constructor (here, the Java compiler has silently provided one for us)
+  
+  []
+  
+  The template referenced the property currentTime and we're providing that as a property, as a <synthetic property>, a property that is computed on the fly
+  (rather than stored in an instance variable).
+  
+  This means that every time the page renders, a fresh Date instance is created, which is just what we want.
+  
+  As the page renders, it generates the HTML markup that is sent to the client web browser.  For most of the page, that markup is
+  exactly what came out of the component template: this is called the <static content> (we're using the term "static" to mean "unchanging").
+  
+  The expansion, <<<$\{currentTime}>>>, is <dynamic>: different every time.  Tapestry will read that property and convert the result
+  into a string, and that string is mixed into the stream of markup sent to the client. <We'll often talk about the "client" and we don't mean
+  the people you send your invoices to: we're talking about the client web browser. Of course, in a world of web spiders and other
+  screen scrapers, there's no guarantee that the thing on the other end of the HTTP pipe is really a web browser. You'll often see low-level HTML
+  and HTTP documentation talk about the "user agent".>  Likewise, the PageLink component is dynamic, in that it genrates a URL that is
+  (potentially) different every time.
+  
+  Tapestry follows the rules defined by Sun's JavaBeans specification: a property name of currentTime maps to two methods: getCurrentTime() and setCurrentTime(). If you omit one of the other of these
+  methods, the property is either read only (as here), or write only.
+  
+  Tapestry does go one step further: it ignores case when matching properties inside the expansion to properties of the page. In the template we could say
+  <<<$\{currenttime}>>> or <<<$\{CurrentTime}>>> or any variation, and Tapestry will <still> invoke the getCurrentTime() method.
+  
+  
+  
+ 
+
+  
+  
+  
\ No newline at end of file

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/index.apt?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/index.apt (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/index.apt Sat Jun  9 08:33:19 2007
@@ -0,0 +1,61 @@
+ ---
+ Tutorial: Introduction
+ ---
+
+Tapestry Tutorial: Introduction
+
+* What is Tapestry?
+
+  Welcome to Tapestry! 
+
+  This is a tutorial for people who will be creating Tapestry 5 applications.  It doesn't matter whether you have experience with Tapestry 4 (or Tapestry 3, for that matter) or whether you are completely new to Tapestry.  
+  In fact, in some ways, the less you know about web development in general, and Tapestry in particular, the better of you may be ... that much less to unlearn!
+
+  You do need to have a reasonable understanding of HTML, a smattering of XML, and a good understanding of basic Java language features, and a few newer things such as Java Annotations.
+  
+  If you're used to developing web applications using servlets and JSPs, or with Struts, you are simply used to a lot of pain. So much pain, you may not even understand the dire situation you are in! 
+  These are environments with no safety net; Struts and the Servlet API has no idea how your application is structured, or how the different pieces fit together.  
+  Any URL can be an action and any action can forward to any view (usually a JSP) to provide an HTML response to the web browser.  
+  The pain is the unending series of small, yet important, decisions you have to make as a developer (and communicate to the rest of your team).  
+  What are the naming conventions for actions, for pages, for attributes stored in the HttpSession or HttpServletRequest? 
+
+  The traditional approaches thrust something most unwanted in your face: multithreaded coding. Remember back to Object Oriented Programming 101 where an object was defined as a bundle of data and operations on that data?
+  You have to unlearn that lesson as soon as you build a web application, because web applications are multi-threaded. 
+  An application server could be handling dozens or hundreds of requests from individual users, each in their own thread, and each sharing the exact same objects.  
+  Suddenly, you can't store data inside an object (a servlet or a Struts Action) because whatever data your store for one user will be instantly overwritten by some other user.
+
+  Worse, your objects each have one operation: doGet() or doPost().
+
+  Meanwhile, most of your day-to-day work involves deciding how to package up some data already inside a particular Java object and squeeze that data into a URL's query parameters,
+  so that you can write more code to convert it back if the user clicks that particular link.  And don't forget editing a bunch of XML files to keep the servlet container, or the Struts framework, aware of these decisions.  
+
+  Just for laughs, remember that you have to rebuild, redeploy and restart your application after virtually any change.  Is any of this familiar?  Then perhaps you'd appreciate something a little <less> familiar: Tapestry.
+
+  Tapestry uses a very different model: a structured, organized world of pages, and components within pages. Everything has a very specific name (that you provide). 
+  Once you know the name of a page, you know the location of the Java class for that page, the location of the template for that page, and the total structure of the page. 
+  Tapestry knows all this as well, and can make things just work.
+
+  As well see in the following chapters, Tapestry lets you code in terms of your objects. You'll barely see any Tapestry classes, outside of a few Java annotations. 
+  If you have information to store, store it as fields of your classes, not inside the HttpServletRequest or HttpSession. 
+  If you need some code to execute, its just a simple annotation or method naming convention to get Tapestry to invoke that method, at the right time, 
+  with the right data. The methods don't even have to be public!
+
+  Tapestry also shields you from the multi-threaded aspects of web application development. 
+  Tapestry manages the life-cycles of your page and components objects, reserving particular objects to particular threads so 
+  that you never have to think twice about threading issues.
+
+  Tapestry began in January 2000, and now represents over seven years of experience: not just my experience, or that of the other 
+  Tapestry committers, but the experience of the entire Tapestry community. Tapestry brings to the table all that experience about the best ways to 
+  build scalable, maintainable, robust, internationalized (and more recently) Ajax-enabled applications. Tapestry 5 represents a completely new 
+  code base designed to simplify  the Tapestry coding model while at the same time, extending the power of Tapestry and improving performance.
+
+* About Releases and Documentation
+
+  If you are reading this documentation online, be aware that the online documentation generally represents the very latest version of the code, termed "the snapshot". The documentation is <written> as if the 
+  next release is available, but may reference version numbers, or even features, that are only available by building the latest Tapestry source.
+
+*  About the Author
+
+  Howard Lewis Ship is the creator of Tapestry, and the Chair of the Apache Tapestry Project Management Committee at Apache. 
+  Howard is an independent software consultant, specializing in customized Tapestry training, mentoring, architectural review and project work.
+  Howard lives in Portland, Oregon with his wife Suzanne, a novelist.

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import-folder.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import-folder.png?view=auto&rev=545761
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import-folder.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import.png?view=auto&rev=545761
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/eclipse-import.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/startpage.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/startpage.png?view=auto&rev=545761
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/resources/startpage.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/site.xml?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/site.xml (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/site.xml Sat Jun  9 08:33:19 2007
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- 
+   Copyright 2007 The Apache Software Foundation
+
+   Licensed 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="Tapestry 5 Tutorial #1">
+  <bannerLeft>
+    <name>Tapestry 5</name>
+    <href>http://tapestry.apache.org/tapestry5/</href>
+    <src>images/tapestry_banner.gif</src>
+  </bannerLeft>
+  <bannerRight>
+    <name>Apache</name>
+    <href>http://www.apache.org</href>
+    <src>images/asf_logo_wide.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.tapestry</groupId>
+    <artifactId>maven-skin</artifactId>
+    <version>1.1</version>
+  </skin>
+  
+  <publishDate format="dd MMM yyyy" />
+  
+  <body>
+    <links>
+      <item name="Tapestry" href="http://tapestry.apache.org/" />
+      <item name="Apache" href="http://www.apache.org/" />
+    </links>
+    
+    <menu name="Quick Links">
+      <item name="Download" href="http://tapestry.apache.org/download.html"/>
+    </menu>
+        
+    <menu name="Tutorial">
+      <item name="Introduction" href="index.html"/>
+      <item name="Envrionment" href="env.html"/>
+      <item name="Your First Application" href="first.html"/> 
+    </menu>    
+        
+        
+    <menu ref="reports"/>
+    
+  </body>
+</project>

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/java/PLACEHOLDER
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/java/PLACEHOLDER?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/java/PLACEHOLDER (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/java/PLACEHOLDER Sat Jun  9 08:33:19 2007
@@ -0,0 +1 @@
+This placeholder exists to ensure the directory is created. It may be deleted when real files are placed under src/test/java.
\ No newline at end of file

Added: tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/resources/PLACEHOLDER
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/resources/PLACEHOLDER?view=auto&rev=545761
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/resources/PLACEHOLDER (added)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/resources/PLACEHOLDER Sat Jun  9 08:33:19 2007
@@ -0,0 +1 @@
+This placeholder exists to ensure the directory is created. It may be deleted when real files are placed under src/test/resources.
\ No newline at end of file



Mime
View raw message