Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Apache Tapestry #36

Open
wants to merge 18 commits into from

2 participants

@hlship

Just took a little bit to put together an Apache Tapestry contribution; I forked from "master" not "dev" (I didn't see the note about that until later), but I hope it isn't an issue.

Tapestry is quite popular as being fully featured, with both high performance and high productivity, and a very strong reuse option via components. I've been curious about how well Tapestry performs against other Java frameworks, but also against the Rails and "scripting language" world.

Tapestry does a few things differently that potentially hurt it in these kinds of apples-to-oranges comparisons. For example, Tapestry renders its templates to a server-side DOM, then streams that DOM to the client. There's a lot of advantages to that (beyond what I'd care to go into here), but it does mean that the time to first byte compares poorly against simpler systems. Likewise, Tapestry's default behavior is to encode HTML characters to HTML entities (i.e., > to <) for dynamic text; this also causes some overhead.

On my laptop, I'm seeing about 5ms to handle the database driven request. I suspect that your test will not be able to saturate the server (given how I've configured the connection pool), though I'm not sure how many threads the Jetty servlet container is configured to use for processing requests.

Anyway, I hope you'll incorporate the Tapestry tests and publish an update with comparisons!

@seedifferently

Howard, thanks so much for the contribution. I'm moving forward slowly on an update, but this is definitely on my radar. I'll ping you here if I have any questions once I get to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2012
  1. @hlship
  2. @hlship

    Add support for IDEA

    hlship authored
    Ignore IDEA control files
    Ignore .gradle directory
    Enable the Gradle jetty plugin
  3. @hlship

    Add a simple README

    hlship authored
  4. @hlship
  5. @hlship
  6. @hlship

    Fix typo

    hlship authored
    Add slightly more description
  7. @hlship

    Reformat all Java source files

    hlship authored
    Remove the TimingFilter
  8. @hlship

    Streamline the app to minimum

    hlship authored
  9. @hlship

    Strip down the application to bare minimum

    hlship authored
    Correct the documentation, to indicate the correct URL (/apache-tapestry5/)
  10. @hlship
  11. @hlship

    Implement the static text and static template options

    hlship authored
    Remove the Layout component
  12. @hlship

    Add database querying test

    hlship authored
  13. @hlship

    Upgrade to a newer version of sqllite JDBC driver

    hlship authored
    Configure the driver for read-only access to the db
  14. @hlship
  15. @hlship
Commits on Feb 28, 2012
  1. @hlship
  2. @hlship

    Delete more unnecessary content

    hlship authored
  3. @hlship
This page is out of date. Refresh to see the latest.
View
1  .gitignore
@@ -0,0 +1 @@
+.DS_Store
View
8 apache-tapestry5/.gitignore
@@ -0,0 +1,8 @@
+out/
+build/
+*~
+\#*
+.gradle/
+*.iml
+*.iws
+*.ipr
View
39 apache-tapestry5/README.md
@@ -0,0 +1,39 @@
+Tapestry 5.3.2 Implementation
+====
+
+Created by Howard M. Lewis Ship \<hlship@gmail.com\>
+
+[Apache Tapestry](http://tapestry.apache.org) is a popular Java language, component-oriented
+web framework that combines high-performance with terrific developer productivity. This kind
+of simple demo does not demonstrate Tapestry to its strengths, but it should still have a good
+showing here.
+
+Running the Application
+----
+
+The application executes from this directory using Gradle:
+
+ ./gradlew jettyRun
+
+This assumes that JDK 1.6 is installed locally. On first execution,
+the `gradlew` (Gradle Wrapper) script will automatically download all
+necessary dependencies to build and execute the application.
+
+By default, the application is configured to respond to the URL:
+
+ http://localhost:8080/apache-tapestry5/
+
+The root Index page includes simple links to the other three demonstration
+pages:
+
+* http://localhost:8080/apache-tapestry5/index.text
+* http://localhost:8080/apache-tapestry5/helloworldstatic
+* http://localhost:8080/apache-tapestry5/helloworlddb
+
+The application's behavior was copied, as much as possible, from the sinatra application.
+This included copying the hello.db file.
+
+
+
+
+
View
43 apache-tapestry5/build.gradle
@@ -0,0 +1,43 @@
+description = "Great Web Framework Shootout -- Tapestry 5.3.2"
+
+apply plugin: "war"
+apply plugin: "java"
+apply plugin: "jetty"
+apply plugin: "idea"
+
+sourceCompatibility = "1.6"
+targetCompatibility = "1.6"
+
+group = "gwfs"
+version = "1.0-SNAPSHOT"
+
+repositories {
+ mavenCentral()
+}
+
+// This simulates Maven's "provided" scope, until it is officially supported by Gradle
+// See http://jira.codehaus.org/browse/GRADLE-784
+
+configurations {
+ provided
+}
+
+sourceSets {
+ main {
+ compileClasspath += configurations.provided
+ }
+ test {
+ compileClasspath += configurations.provided
+ runtimeClasspath += configurations.provided
+ }
+}
+
+dependencies {
+
+ compile "org.apache.tapestry:tapestry-core:5.3.2"
+
+ compile "org.xerial:sqlite-jdbc:3.7.2"
+ compile "com.jolbox:bonecp:0.7.1.RELEASE"
+
+ provided "javax.servlet:servlet-api:2.5"
+}
View
BIN  apache-tapestry5/gradle/wrapper/gradle-wrapper.jar
Binary file not shown
View
6 apache-tapestry5/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue Jan 24 09:36:54 PST 2012
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-7-bin.zip
View
165 apache-tapestry5/gradlew
@@ -0,0 +1,165 @@
+#!/bin/bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS="-Xmx400m"
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/"
+APP_HOME="`pwd -P`"
+cd "$SAVED"
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add APP_NAME to the JAVA_OPTS as -Xdock:name
+if $darwin; then
+ JAVA_OPTS="$JAVA_OPTS -Xdock:name=$APP_NAME"
+# we may also want to set -Xdock:image
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
View
90 apache-tapestry5/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
View
BIN  apache-tapestry5/hello.db
Binary file not shown
View
13 apache-tapestry5/src/main/java/gwfs/Hello.java
@@ -0,0 +1,13 @@
+package gwfs;
+
+public class Hello {
+
+ public final int id;
+
+ public final String data;
+
+ public Hello(int id, String data) {
+ this.id = id;
+ this.data = data;
+ }
+}
View
48 apache-tapestry5/src/main/java/gwfs/pages/HelloWorldDB.java
@@ -0,0 +1,48 @@
+package gwfs.pages;
+
+import gwfs.Hello;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+public class HelloWorldDB {
+
+ @Inject
+ private DataSource dataSource;
+
+ @Property
+ private Hello hello;
+
+ public List<Hello> getHellos() throws SQLException {
+
+ List<Hello> result = new ArrayList<Hello>();
+
+ Connection connection = null;
+
+ try {
+ connection = dataSource.getConnection();
+
+ Statement stm = connection.createStatement();
+
+ ResultSet rs = stm.executeQuery("select id, data from hello order by id asc");
+
+ while (rs.next()) {
+ Hello hello = new Hello(rs.getInt("id"), rs.getString("data"));
+ result.add(hello);
+ }
+ } finally {
+ connection.close();
+ }
+
+ return result;
+ }
+
+
+}
View
4 apache-tapestry5/src/main/java/gwfs/pages/HelloWorldStatic.java
@@ -0,0 +1,4 @@
+package gwfs.pages;
+
+public class HelloWorldStatic {
+}
View
18 apache-tapestry5/src/main/java/gwfs/pages/Index.java
@@ -0,0 +1,18 @@
+package gwfs.pages;
+
+import org.apache.tapestry5.util.TextStreamResponse;
+
+/**
+ * Start page of application t5app.
+ */
+public class Index {
+
+ /**
+ * This a component action event handler method, for the implicit 'action' event from the "text" ActionLink component in the template.
+ * Normally, this would perform an operation and indicate which page renders the response (which would also, normally, involve
+ * a client-side redirect); we're using a rarely-used Tapestry option to directly return a String as the response.
+ */
+ Object onActionFromText() {
+ return new TextStreamResponse("text/plain", "Hello World!");
+ }
+}
View
73 apache-tapestry5/src/main/java/gwfs/services/AppModule.java
@@ -0,0 +1,73 @@
+package gwfs.services;
+
+import com.jolbox.bonecp.BoneCPDataSource;
+import org.apache.tapestry5.SymbolConstants;
+import org.apache.tapestry5.ioc.MappedConfiguration;
+import org.apache.tapestry5.ioc.ServiceBinder;
+import org.sqlite.SQLiteOpenMode;
+
+import javax.sql.DataSource;
+import java.util.Properties;
+
+/**
+ * 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 service definitions.
+ */
+public class AppModule {
+ public static void bind(ServiceBinder binder) {
+ // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
+
+ // Make bind() calls on the binder object to define most IoC services.
+ // Use service builder methods (example below) when the implementation
+ // is provided inline, or requires more initialization than simply
+ // invoking the constructor.
+ }
+
+ public static void contributeFactoryDefaults(
+ MappedConfiguration<String, Object> configuration) {
+ // The application version number is incorprated into URLs for some
+ // assets. Web browsers will cache assets because of the far future expires
+ // header. If existing assets are changed, the version number should also
+ // change, to force the browser to download new versions. This overrides Tapesty's default
+ // (a random hexadecimal number), but may be further overriden by DevelopmentModule or
+ // QaModule.
+ configuration.override(SymbolConstants.APPLICATION_VERSION, "1.0-SNAPSHOT");
+ }
+
+ public static void contributeApplicationDefaults(
+ MappedConfiguration<String, Object> 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 separated series of locale names;
+ // the first locale name is the default when there's no reasonable match).
+ configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
+ }
+
+ // Normally, all the connection pooling and management stuff comes out of Hibernate,
+ // but this is a quick-and-dirty way to get about the same thing.
+
+ /**
+ * Define a DataSource service.
+ */
+ public DataSource buildBoneCPDataSource() throws Exception {
+
+ Properties props = new Properties();
+
+ props.put("open_mode", String.valueOf(SQLiteOpenMode.READONLY));
+
+ BoneCPDataSource ds = new BoneCPDataSource();
+ ds.setDriverClass("org.sqlite.JDBC");
+ ds.setJdbcUrl("jdbc:sqlite:hello.db");
+ ds.setProperties(props);
+ ds.setUsername("n/a");
+ ds.setPassword("n/a");
+ // The test documentation indicates up to about 15 parallel requests, so let's make sure there's
+ // always a connection ready in the pool.
+ ds.setMinConnectionsPerPartition(15);
+ ds.setMaxConnectionsPerPartition(20);
+
+ return ds;
+ }
+
+}
View
26 apache-tapestry5/src/main/resources/gwfs/pages/HelloWorldDB.tml
@@ -0,0 +1,26 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
+<head><title>Hello World (DB)</title></head>
+<body>
+
+<p>Lorem ipsum dolor sit amet, consecteteur adipiscing elit nisi ultricies. Condimentum vel, at augue nibh sed. Diam
+ praesent metus ut eros, sem penatibus. Pellentesque. Fusce odio posuere litora non integer habitant proin. Metus
+ accumsan nibh facilisis nostra lobortis cum diam tellus. Malesuada nostra a volutpat pede primis congue nisl feugiat
+ in fermentum. Orci in hymenaeos. Eni tempus mi mollis lacinia orci interdum lacus. Sollicitudin aliquet, etiam. Ac.
+ Mi, nullam ligula, tristique penatibus nisi eros nisl pede pharetra congue, aptent nulla, rhoncus tellus morbi,
+ ornare. Magna condimentum erat turpis. Fusce arcu ve suscipit nisi phasellus rutrum a dictumst leo, laoreet dui,
+ ultricies platea. Porta venenatis fringilla vestibulum arcu etiam condimentum non.</p>
+
+<table border="1">
+ <t:loop source="hellos" value="hello">
+ <tr>
+ <td>
+ ${hello.id}
+ </td>
+ <td>
+ ${hello.data}
+ </td>
+ </tr>
+ </t:loop>
+</table>
+</body>
+</html>
View
7 apache-tapestry5/src/main/resources/gwfs/pages/HelloWorldStatic.tml
@@ -0,0 +1,7 @@
+<p>Lorem ipsum dolor sit amet, consecteteur adipiscing elit nisi ultricies. Condimentum vel, at augue nibh sed. Diam
+ praesent metus ut eros, sem penatibus. Pellentesque. Fusce odio posuere litora non integer habitant proin. Metus
+ accumsan nibh facilisis nostra lobortis cum diam tellus. Malesuada nostra a volutpat pede primis congue nisl feugiat
+ in fermentum. Orci in hymenaeos. Eni tempus mi mollis lacinia orci interdum lacus. Sollicitudin aliquet, etiam. Ac.
+ Mi, nullam ligula, tristique penatibus nisi eros nisl pede pharetra congue, aptent nulla, rhoncus tellus morbi,
+ ornare. Magna condimentum erat turpis. Fusce arcu ve suscipit nisi phasellus rutrum a dictumst leo, laoreet dui,
+ ultricies platea. Porta venenatis fringilla vestibulum arcu etiam condimentum non.</p>
View
22 apache-tapestry5/src/main/resources/gwfs/pages/Index.tml
@@ -0,0 +1,22 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
+<head>
+ <title>Apache Tapestry 5</title>
+</head>
+<body>
+<ul>
+ <li>
+ <t:actionlink t:id="text">Static Text HelloWorld</t:actionlink>
+ -- uses a TextStreamResponse
+ </li>
+ <li>
+ <t:pagelink page="HelloWorldStatic">Static HelloWorld</t:pagelink>
+ -- uses a very simple template with no dynamic behavior
+ </li>
+ <li>
+ <t:pagelink page="HelloWorldDB">Database HelloWorld</t:pagelink>
+ -- uses a connection bool over a SQLLite3 database
+ </li>
+</ul>
+</body>
+
+</html>
View
43 apache-tapestry5/src/main/resources/log4j.properties
@@ -0,0 +1,43 @@
+# Default to info level output; this is very handy if you eventually use Hibernate as well.
+log4j.rootCategory=info, 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{2} %m%n
+
+# Service category names are the name of the defining module class
+# and then the service id.
+
+# Outputs a list of pages, components and mixins at startup.
+log4j.category.org.apache.tapestry5.services.TapestryModule.ComponentClassResolver=info
+
+# Outputs startup statistics; elapsed time to setup and initialize the registry, a list of
+# available services, and a launch banner that includes the Tapestry version number.
+log4j.category.org.apache.tapestry5.TapestryFilter=info
+
+
+# Turning on debug mode for a page's or component's transformer logger
+# will show all of the code changes that occur when the
+# class is loaded.
+
+# log4j.category.tapestry.transformer.gwfs.pages.Index=debug
+
+# Turning on debug mode for a component's events logger will show all the events triggered on the
+# component, and which component methods are invoked as a result.
+
+# log4j.category.tapestry.events.gwfs.pages.Index=debug
+
+# Turning on trace mode for a page's render logger provides extended information about every step
+# in rendering (this is not generally helpful). Turning on debug mode will add a one-line
+# summary that includes the elapsed render time, which can be useful in tracking down
+# performance issues.
+
+# log4j.category.tapestry.render.gwfs.pages.Index=debug
+
+# Turn on some verbose debugging about everything in the application. This is nice initially,
+# while getting everything set up. You'll probably want to remove this once you are
+# up and running, replacing it with more selective debugging output.
+log4j.category.gwfs=info
View
22 apache-tapestry5/src/main/webapp/WEB-INF/web.xml
@@ -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>t5app 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>gwfs</param-value>
+ </context-param>
+ <filter>
+ <filter-name>app</filter-name>
+ <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>app</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+</web-app>
+
Something went wrong with that request. Please try again.