tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r482719 [1/4] - in /tapestry/tapestry5/tapestry-core/trunk/src: main/java/org/apache/tapestry/ main/java/org/apache/tapestry/annotations/ main/java/org/apache/tapestry/corelib/base/ main/java/org/apache/tapestry/corelib/components/ main/jav...
Date Tue, 05 Dec 2006 17:35:14 GMT
Author: hlship
Date: Tue Dec  5 09:35:05 2006
New Revision: 482719

URL: http://svn.apache.org/viewvc?view=rev&rev=482719
Log:
Rename WebRequest, WebResponse, etc. to Request, Response, etc.
Allow components to "inherit" the template of their super class.
Add support for classpath assets.
Use capitalized names with the infrastructure: object provider (i.e., "Request" not "request").
Allow for path aliases for classpath asset client URLs (shorter, more mneumonic paths).
Send appropriate last modified and expired headers for classpath assets, and handle If-Modified-Since on classpath asset requests.

Added:
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/TapestryUtils.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetDispatcher.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetAliasManagerImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetFactory.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextImpl.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebContextImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestImpl.java
      - copied, changed from r480168, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebRequestImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceCache.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceCacheImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceDigestGeneratorImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceStreamer.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceStreamerImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResponseImpl.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebResponseImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/SessionImpl.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebSessionImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/ClasspathAssetAliasManager.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/Context.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebContext.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/Request.java
      - copied, changed from r480168, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebRequest.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/RequestFilter.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebRequestFilter.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/RequestHandler.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebRequestHandler.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/ResourceDigestGenerator.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/Response.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebResponse.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/Session.java
      - copied, changed from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebSession.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/ExpansionSubclass.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/AssetDispatcherTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ClasspathAssetAliasManagerImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ClasspathAssetFactoryTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ResourceCacheImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ResourceDigestGeneratorImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/integration/app1/pages/smiley.png   (with props)
    tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/integration/app1/pages/tapestry-button.png   (with props)
Removed:
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebContextImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebRequestImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebResponseImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebSessionImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebContext.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebRequest.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebRequestFilter.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebRequestHandler.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebResponse.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/WebSession.java
Modified:
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/TapestryConstants.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Inject.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Persist.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/base/AbstractField.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Checkbox.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextArea.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextField.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ApplicationGlobalsImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetSourceImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/CheckForUpdatesFilter.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventDispatcher.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentMessagesSourceImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSource.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextAssetFactory.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextResource.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/DefaultRequestExceptionHandler.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRenderer.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRendererImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestGlobalsImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategy.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/StaticFilesFilter.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/test/InternalBaseTestCase.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/URLChangeTracker.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/ApplicationGlobals.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/ApplicationInitializer.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/ApplicationInitializerFilter.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/Dispatcher.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/RequestGlobals.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TapestryModule.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TapestryTestCase.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/services/ServicesStrings.properties
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/infrastructure.apt
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/inject.apt
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/request.apt
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/templates.apt
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/index.apt
    tapestry/tapestry5/tapestry-core/trunk/src/test/app1/index.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/AssetDemo.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/InjectDemo.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/Localization.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/services/AppModule.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ComponentEventImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ContextAssetFactoryTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ContextResourceTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/InjectAnonymousWorkerTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/InjectNamedWorkerTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/LinkFactoryImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/LinkImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/LocalizationFilterTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/PageLoaderImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/PageRenderDispatcherTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategyTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/WebRequestImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/WebSessionImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/util/URLChangeTrackerTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/integration/app1/pages/AssetDemo.html

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/TapestryConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/TapestryConstants.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/TapestryConstants.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/TapestryConstants.java Tue Dec  5 09:35:05 2006
@@ -26,7 +26,6 @@
      * Event triggered when a page is activated (for rendering). The component event handler will be
      * passed the context provided by the passivate event.
      */
-
     public static final String ACTIVATE_EVENT = "activate";
 
     /**
@@ -34,8 +33,12 @@
      * provide an object, or an array of objects, as the context for the page. These values will
      * become part of the page's context, and will be provided back when the page is activated.
      */
-    
     public static final String PASSIVATE_EVENT = "passivate";
+
+    /**
+     * Request path prefix that identifies an internal (on the classpath) asset.
+     */
+    public static final String ASSET_PATH_PREFIX = "/asset/";
 
     private TapestryConstants()
     {

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Inject.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Inject.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Inject.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Inject.java Tue Dec  5 09:35:05 2006
@@ -32,8 +32,8 @@
  * In most other cases, the value is an object reference. A common example:
  * 
  * <pre>
- * @Inject(&quot;infrastructure:request&quot;)
- * private WebRequest _request;
+ * @Inject(&quot;infrastructure:Request&quot;)
+ * private Request _request;
  * </pre>
  * 
  * <p>

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Persist.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Persist.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Persist.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/Persist.java Tue Dec  5 09:35:05 2006
@@ -21,12 +21,12 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-import org.apache.tapestry.services.WebSession;
+import org.apache.tapestry.services.Session;
 
 /**
  * Identifies a field as persistent, meaning its value persists from one request to the next.
  * Different strategies exist for how this is accomplished, the most common being the default,
- * "session", which stores the field's value in the {@link WebSession}.
+ * "session", which stores the field's value in the {@link Session}.
  */
 @Target(FIELD)
 @Documented
@@ -35,7 +35,7 @@
 
     /**
      * The strategy used to persist the value; the default is "session", meaning indefintely inside
-     * the {@link WebSession}.
+     * the {@link Session}.
      */
     String value() default "session";
 }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/base/AbstractField.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/base/AbstractField.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/base/AbstractField.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/base/AbstractField.java Tue Dec  5 09:35:05 2006
@@ -31,7 +31,7 @@
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.apache.tapestry.services.FormSupport;
 import org.apache.tapestry.services.PageRenderSupport;
-import org.apache.tapestry.services.WebRequest;
+import org.apache.tapestry.services.Request;
 
 /**
  * Provides initialization of the clientId and elementName properties. In addition, adds the
@@ -97,8 +97,8 @@
     @Inject
     private ComponentResources _resources;
 
-    @Inject("infrastructure:request")
-    private WebRequest _request;
+    @Inject("infrastructure:Request")
+    private Request _request;
 
     @SetupRender
     final void setup()
@@ -159,7 +159,7 @@
      * @param elementName
      *            the name of the element (used to find the correct parameter in the request)
      */
-    protected abstract void processSubmission(WebRequest request, String elementName);
+    protected abstract void processSubmission(Request request, String elementName);
 
     public final String getLabel()
     {

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Checkbox.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Checkbox.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Checkbox.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Checkbox.java Tue Dec  5 09:35:05 2006
@@ -19,7 +19,7 @@
 import org.apache.tapestry.annotations.BeginRender;
 import org.apache.tapestry.annotations.Parameter;
 import org.apache.tapestry.corelib.base.AbstractField;
-import org.apache.tapestry.services.WebRequest;
+import org.apache.tapestry.services.Request;
 
 /** A Checkbox coponent is simply a &lt;input type="checkbox"&gt;. */
 public class Checkbox extends AbstractField
@@ -50,7 +50,7 @@
     }
 
     @Override
-    protected void processSubmission(WebRequest request, String elementName)
+    protected void processSubmission(Request request, String elementName)
     {
         String postedValue = request.getParameter(elementName);
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java Tue Dec  5 09:35:05 2006
@@ -43,7 +43,7 @@
 import org.apache.tapestry.services.Environment;
 import org.apache.tapestry.services.FormSupport;
 import org.apache.tapestry.services.PageRenderSupport;
-import org.apache.tapestry.services.WebRequest;
+import org.apache.tapestry.services.Request;
 
 /**
  * An HTML form, which will enclose other components to render out the various types of fields.
@@ -86,7 +86,7 @@
      */
     public static final String FORM_DATA = "t:formdata";
 
-    @Inject("infrastructure:environment")
+    @Inject("infrastructure:Environment")
     private Environment _environment;
 
     @Inject
@@ -95,10 +95,10 @@
     @Environmental
     private PageRenderSupport _pageRenderSupport;
 
-    @Inject("infrastructure:request")
-    private WebRequest _request;
+    @Inject("infrastructure:Request")
+    private Request _request;
 
-    @Inject("infrastructure:componentSource")
+    @Inject("infrastructure:ComponentSource")
     private ComponentSource _source;
 
     // Collects a stream of component actions. Each action goes in as a UTF string (the component

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextArea.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextArea.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextArea.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextArea.java Tue Dec  5 09:35:05 2006
@@ -20,7 +20,7 @@
 import org.apache.tapestry.annotations.BeginRender;
 import org.apache.tapestry.annotations.Parameter;
 import org.apache.tapestry.corelib.base.AbstractField;
-import org.apache.tapestry.services.WebRequest;
+import org.apache.tapestry.services.Request;
 
 /**
  * TextArea component corresponds to a &lt;textarea&gt;. The value parameter is almost always bound
@@ -57,7 +57,7 @@
     }
 
     @Override
-    protected void processSubmission(WebRequest request, String elementName)
+    protected void processSubmission(Request request, String elementName)
     {
         _value = request.getParameter(elementName);
     }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextField.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextField.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextField.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/TextField.java Tue Dec  5 09:35:05 2006
@@ -19,7 +19,7 @@
 import org.apache.tapestry.annotations.BeginRender;
 import org.apache.tapestry.annotations.Parameter;
 import org.apache.tapestry.corelib.base.AbstractField;
-import org.apache.tapestry.services.WebRequest;
+import org.apache.tapestry.services.Request;
 
 /**
  * TextField component corresponds to &lt;input type="text"&gt;. The value parameter will be
@@ -53,7 +53,7 @@
     }
 
     @Override
-    protected void processSubmission(WebRequest request, String elementName)
+    protected void processSubmission(Request request, String elementName)
     {
         _value = request.getParameter(elementName);
     }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java Tue Dec  5 09:35:05 2006
@@ -22,8 +22,8 @@
 import org.apache.tapestry.ioc.services.ExceptionAnalyzer;
 import org.apache.tapestry.ioc.services.ExceptionInfo;
 import org.apache.tapestry.services.ExceptionReporter;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebSession;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.Session;
 
 /**
  * Responsible for reporting runtime exceptions. This page is quite verbose and is usually
@@ -45,8 +45,8 @@
     @Inject("service:tapestry.ioc.ExceptionAnalyzer")
     private ExceptionAnalyzer _analyzer;
 
-    @Inject("infrastructure:request")
-    private WebRequest _request;
+    @Inject("infrastructure:Request")
+    private Request _request;
 
     public void reportException(Throwable exception)
     {
@@ -100,7 +100,7 @@
         return _request.getSession(false) != null;
     }
 
-    public WebSession getSession()
+    public Session getSession()
     {
         return _request.getSession(false);
     }

Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/TapestryUtils.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/TapestryUtils.java?view=auto&rev=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/TapestryUtils.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/TapestryUtils.java Tue Dec  5 09:35:05 2006
@@ -0,0 +1,41 @@
+// Copyright 2006 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.
+
+package org.apache.tapestry.internal;
+
+import java.io.Closeable;
+import java.io.IOException;
+
+/** Shared utility methods used by various implementation classes. */
+public class TapestryUtils
+{
+    private TapestryUtils()
+    {
+        // Prevent instantiation.
+    }
+
+    public static final void close(Closeable stream)
+    {
+        if (stream != null)
+            try
+            {
+                stream.close();
+            }
+            catch (IOException ex)
+            {
+                // Ignore.
+            }
+    }
+
+}

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ApplicationGlobalsImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ApplicationGlobalsImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ApplicationGlobalsImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ApplicationGlobalsImpl.java Tue Dec  5 09:35:05 2006
@@ -17,7 +17,7 @@
 import javax.servlet.ServletContext;
 
 import org.apache.tapestry.services.ApplicationGlobals;
-import org.apache.tapestry.services.WebContext;
+import org.apache.tapestry.services.Context;
 
 /**
  * 
@@ -26,7 +26,7 @@
 {
     private ServletContext _servletContext;
 
-    private WebContext _context;
+    private Context _context;
 
     public void store(ServletContext context)
     {
@@ -38,12 +38,12 @@
         return _servletContext;
     }
 
-    public WebContext getWebContext()
+    public Context getContext()
     {
         return _context;
     }
 
-    public void store(WebContext context)
+    public void store(Context context)
     {
         _context = context;
     }

Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetDispatcher.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetDispatcher.java?view=auto&rev=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetDispatcher.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetDispatcher.java Tue Dec  5 09:35:05 2006
@@ -0,0 +1,151 @@
+// Copyright 2006 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.
+
+package org.apache.tapestry.internal.services;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.tapestry.TapestryConstants;
+import org.apache.tapestry.ioc.Resource;
+import org.apache.tapestry.ioc.internal.util.ClasspathResource;
+import org.apache.tapestry.services.ClasspathAssetAliasManager;
+import org.apache.tapestry.services.Dispatcher;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.Response;
+
+/**
+ * Recognizes requests where the path begins with "/asset/" and delivers the content therein as a
+ * bytestream. Also handles requests that are simply polling for a change to the file. Eventually,
+ * will require a checksum as part of the path, for files with a particular extension (such as
+ * .class), so that malicous clients can't troll for code.
+ */
+public class AssetDispatcher implements Dispatcher
+{
+    private final ResourceStreamer _streamer;
+
+    private final ClasspathAssetAliasManager _aliasManager;
+
+    private final ResourceCache _resourceCache;
+
+    public static final String IF_MODIFIED_SINCE_HEADER = "If-Modified-Since";
+
+    public AssetDispatcher(final ResourceStreamer streamer,
+            ClasspathAssetAliasManager aliasManager, ResourceCache resourceCache)
+    {
+        _streamer = streamer;
+        _aliasManager = aliasManager;
+        _resourceCache = resourceCache;
+    }
+
+    public boolean dispatch(Request request, Response response) throws IOException
+    {
+        String path = request.getPath();
+
+        // Remember that the request path does not include the context path, so we can simply start
+        // looking for the asset path prefix right off the bat.
+
+        if (!path.startsWith(TapestryConstants.ASSET_PATH_PREFIX))
+            return false;
+
+        // ClassLoaders like their paths to start with a leading slash.
+
+        String resourcePath = _aliasManager.toResourcePath(path);
+
+        Resource resource = findResourceAndValidateDigest(response, resourcePath);
+
+        if (resource == null)
+            return true;
+
+        // TODO: Check type of request and send correct error code if resource unchanged.
+
+        URL url = resource.toURL();
+
+        if (url == null)
+        {
+            response.sendError(HttpServletResponse.SC_NOT_FOUND, ServicesMessages
+                    .assetDoesNotExist(resource));
+            return true;
+        }
+
+        long ifModifiedSince = request.getDateHeader(IF_MODIFIED_SINCE_HEADER);
+        if (ifModifiedSince > 0 && ifModifiedSince >= _resourceCache.getTimeModified(resource))
+        {
+            response.sendError(HttpServletResponse.SC_NOT_MODIFIED, "");
+            return true;
+        }
+
+        _streamer.streamResource(resource);
+
+        return true;
+    }
+
+    /**
+     * @param response
+     * @param resourcePath
+     * @return the true resource (with the digest stripped out of the URL) or null if the digest is
+     *         invalid
+     * @throws IOException
+     */
+    private Resource findResourceAndValidateDigest(Response response, String resourcePath)
+            throws IOException
+    {
+        Resource resource = new ClasspathResource(resourcePath);
+
+        if (!_resourceCache.requiresDigest(resource))
+            return resource;
+
+        String file = resource.getFile();
+
+        // Somehow this code got real ugly, but it's all about preventing NPEs when a resource
+        // that should have a digest doesn't.
+
+        boolean valid = false;
+        Resource result = resource;
+
+        int lastdotx = file.lastIndexOf('.');
+
+        if (lastdotx > 0)
+        {
+            int prevdotx = file.lastIndexOf('.', lastdotx - 1);
+
+            if (prevdotx > 0)
+            {
+
+                String requestDigest = file.substring(prevdotx + 1, lastdotx);
+
+                // Strip the digest out of the file name.
+
+                String realFile = file.substring(0, prevdotx) + file.substring(lastdotx);
+
+                result = resource.forFile(realFile);
+
+                String actualDigest = _resourceCache.getDigest(result);
+
+                valid = requestDigest.equals(actualDigest);
+            }
+        }
+
+        if (!valid)
+        {
+            response.sendError(HttpServletResponse.SC_FORBIDDEN, ServicesMessages
+                    .wrongAssetDigest(result));
+            result = null;
+        }
+
+        return result;
+    }
+}

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetSourceImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetSourceImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/AssetSourceImpl.java Tue Dec  5 09:35:05 2006
@@ -28,7 +28,7 @@
 
 /**
  * Implementation of {@link AssetSource} available as service:tapestry.AssetSource or
- * infrastructure:assetSource.
+ * infrastructure:AssetSource.
  */
 public class AssetSourceImpl implements AssetSource
 {

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/CheckForUpdatesFilter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/CheckForUpdatesFilter.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/CheckForUpdatesFilter.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/CheckForUpdatesFilter.java Tue Dec  5 09:35:05 2006
@@ -19,10 +19,10 @@
 import org.apache.tapestry.internal.util.Holder;
 import org.apache.tapestry.ioc.internal.util.ConcurrentBarrier;
 import org.apache.tapestry.ioc.internal.util.Invokable;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebRequestFilter;
-import org.apache.tapestry.services.WebRequestHandler;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.RequestFilter;
+import org.apache.tapestry.services.RequestHandler;
+import org.apache.tapestry.services.Response;
 
 /**
  * Implements a barrier that periodically asks the
@@ -30,7 +30,7 @@
  * The UpdateListenerHub is invoked from a write method, meaning that when it is called, all other
  * threads will be blocked.
  */
-public class CheckForUpdatesFilter implements WebRequestFilter
+public class CheckForUpdatesFilter implements RequestFilter
 {
     private long _lastCheck = 0;
 
@@ -72,8 +72,8 @@
         _checkInterval = checkInterval;
     }
 
-    public boolean service(final WebRequest request, final WebResponse response,
-            final WebRequestHandler handler) throws IOException
+    public boolean service(final Request request, final Response response,
+            final RequestHandler handler) throws IOException
     {
         final Holder<IOException> exceptionHolder = new Holder<IOException>();
 

Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetAliasManagerImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetAliasManagerImpl.java?view=auto&rev=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetAliasManagerImpl.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetAliasManagerImpl.java Tue Dec  5 09:35:05 2006
@@ -0,0 +1,115 @@
+// Copyright 2006 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.
+
+package org.apache.tapestry.internal.services;
+
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tapestry.TapestryConstants;
+import org.apache.tapestry.services.ClasspathAssetAliasManager;
+import org.apache.tapestry.services.Request;
+
+public class ClasspathAssetAliasManagerImpl implements ClasspathAssetAliasManager
+{
+    private final Request _request;
+
+    /** Map from alias to path. */
+    private final Map<String, String> _aliasToPathPrefix;
+
+    /** Map from path to alias. */
+    private final Map<String, String> _pathPrefixToAlias = newMap();
+
+    private final List<String> _sortedAliases;
+
+    private final List<String> _sortedPathPrefixes;
+
+    /**
+     * Configuration is a map of aliases (short names) to complete names. Keys and values should not
+     * start with a slash, but should end with one. Example: "tapestry/" --> "org/apache/tapestry/".
+     * 
+     * @param configuration
+     */
+    public ClasspathAssetAliasManagerImpl(Request request,
+            final Map<String, String> configuration)
+    {
+        _request = request;
+
+        _aliasToPathPrefix = configuration;
+
+        for (Map.Entry<String, String> e : _aliasToPathPrefix.entrySet())
+        {
+            _pathPrefixToAlias.put(e.getValue(), e.getKey());
+        }
+
+        Comparator<String> sortDescendingByLength = new Comparator<String>()
+        {
+            public int compare(String o1, String o2)
+            {
+                return o2.length() - o1.length();
+            }
+        };
+
+        _sortedAliases = newList(_aliasToPathPrefix.keySet());
+        Collections.sort(_sortedAliases, sortDescendingByLength);
+
+        _sortedPathPrefixes = newList(_aliasToPathPrefix.values());
+        Collections.sort(_sortedPathPrefixes, sortDescendingByLength);
+    }
+
+    public String toClientURL(String resourcePath)
+    {
+        StringBuilder builder = new StringBuilder(_request.getContextPath());
+        builder.append(TapestryConstants.ASSET_PATH_PREFIX);
+
+        for (String pathPrefix : _sortedPathPrefixes)
+        {
+            if (resourcePath.startsWith(pathPrefix))
+            {
+                String alias = _pathPrefixToAlias.get(pathPrefix);
+                builder.append(alias);
+                builder.append(resourcePath.substring(pathPrefix.length()));
+
+                return builder.toString();
+            }
+        }
+
+        // No alias available as a prefix (kind of unlikely, but whatever).
+
+        builder.append(resourcePath);
+
+        return builder.toString();
+    }
+
+    public String toResourcePath(String clientURL)
+    {
+        String basePath = clientURL.substring(TapestryConstants.ASSET_PATH_PREFIX.length());
+
+        for (String alias : _sortedAliases)
+        {
+            if (basePath.startsWith(alias))
+            {
+                return _aliasToPathPrefix.get(alias) + basePath.substring(alias.length());
+            }
+        }
+
+        return basePath;
+    }
+
+}

Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetFactory.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetFactory.java?view=auto&rev=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetFactory.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ClasspathAssetFactory.java Tue Dec  5 09:35:05 2006
@@ -0,0 +1,119 @@
+// Copyright 2006 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.
+
+package org.apache.tapestry.internal.services;
+
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newThreadSafeMap;
+
+import java.util.Map;
+
+import org.apache.tapestry.Asset;
+import org.apache.tapestry.events.InvalidationListener;
+import org.apache.tapestry.ioc.Resource;
+import org.apache.tapestry.ioc.internal.util.ClasspathResource;
+import org.apache.tapestry.services.AssetFactory;
+import org.apache.tapestry.services.ClasspathAssetAliasManager;
+
+/**
+ * Generates Assets for files on the classpath. Caches generated client URLs internally, and clears
+ * that cache when notified to do so by the {@link ResourceCache}.
+ * 
+ * @see AssetDispatcher
+ */
+public class ClasspathAssetFactory implements AssetFactory, InvalidationListener
+{
+    private final ResourceCache _cache;
+
+    private final ClasspathAssetAliasManager _aliasManager;
+
+    private final Map<Resource, String> _resourceToClientURL = newThreadSafeMap();
+
+    public ClasspathAssetFactory(final ResourceCache cache,
+            final ClasspathAssetAliasManager aliasManager)
+    {
+        _cache = cache;
+        _aliasManager = aliasManager;
+    }
+
+    public void objectWasInvalidated()
+    {
+        _resourceToClientURL.clear();
+    }
+
+    private String clientURL(Resource resource)
+    {
+        String clientURL = _resourceToClientURL.get(resource);
+
+        if (clientURL == null)
+        {
+            clientURL = buildClientURL(resource);
+            _resourceToClientURL.put(resource, clientURL);
+        }
+
+        return clientURL;
+    }
+
+    private String buildClientURL(Resource resource)
+    {
+        boolean requiresDigest = _cache.requiresDigest(resource);
+
+        String path = resource.getPath();
+
+        if (requiresDigest)
+        {
+            // Resources with extensions go from foo/bar/baz.txt --> foo/bar/baz.CHECKSUM.txt
+
+            int lastdotx = path.lastIndexOf('.');
+
+            String revisedPath = path.substring(0, lastdotx + 1) + _cache.getDigest(resource)
+                    + path.substring(lastdotx);
+
+            return _aliasManager.toClientURL(revisedPath);
+        }
+
+        return _aliasManager.toClientURL(path);
+    }
+
+    public Asset createAsset(final Resource resource)
+    {
+        // TODO: Assets will eventually have a kind of symbolic link used
+        // to shorten the path. Some assets may need to have a checksum embedded
+        // in the path as well.
+
+        return new Asset()
+        {
+            public Resource getResource()
+            {
+                return resource;
+            }
+
+            public String toClientURL()
+            {
+                return clientURL(resource);
+            }
+
+            @Override
+            public String toString()
+            {
+                return toClientURL();
+            }
+        };
+    }
+
+    public Resource getRootResource()
+    {
+        return new ClasspathResource("");
+    }
+
+}

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventDispatcher.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventDispatcher.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventDispatcher.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventDispatcher.java Tue Dec  5 09:35:05 2006
@@ -21,8 +21,8 @@
 import org.apache.tapestry.internal.structure.ComponentPageElement;
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.services.Dispatcher;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.Response;
 
 /**
  * Processes component action events sent as requests from the client. Action events include an
@@ -43,7 +43,7 @@
         _linkFactory = linkFactory;
     }
 
-    public boolean dispatch(WebRequest request, WebResponse response) throws IOException
+    public boolean dispatch(Request request, Response response) throws IOException
     {
         String path = request.getPath();
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentMessagesSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentMessagesSourceImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentMessagesSourceImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentMessagesSourceImpl.java Tue Dec  5 09:35:05 2006
@@ -19,8 +19,6 @@
 import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newThreadSafeMap;
 
 import java.io.BufferedInputStream;
-import java.io.Closeable;
-import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.Collections;
@@ -30,6 +28,7 @@
 import java.util.Properties;
 
 import org.apache.tapestry.events.UpdateListener;
+import org.apache.tapestry.internal.TapestryUtils;
 import org.apache.tapestry.internal.event.InvalidationEventHubImpl;
 import org.apache.tapestry.internal.util.MultiKey;
 import org.apache.tapestry.internal.util.URLChangeTracker;
@@ -232,7 +231,7 @@
         }
         finally
         {
-            close(is);
+            TapestryUtils.close(is);
         }
 
         for (Map.Entry e : p.entrySet())
@@ -248,18 +247,5 @@
         }
 
         return result;
-    }
-
-    private final void close(Closeable stream)
-    {
-        if (stream != null)
-            try
-            {
-                stream.close();
-            }
-            catch (IOException ex)
-            { // Ignore.
-
-            }
     }
 }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSource.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSource.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSource.java Tue Dec  5 09:35:05 2006
@@ -18,6 +18,7 @@
 
 import org.apache.tapestry.internal.event.InvalidationEventHub;
 import org.apache.tapestry.internal.parser.ComponentTemplate;
+import org.apache.tapestry.model.ComponentModel;
 
 /**
  * Provides access to cached {@link org.apache.tapestry.internal.parser.ComponentTemplate}s. The
@@ -25,21 +26,26 @@
  * template resource changes. The listener for these invalidation events is the page source, which
  * stores cached page instances.
  * <p>
- * Any search for a template will success, but the template returned may be the
- * {@link ComponentTemplate#isMissing() missing template}.
+ * Any search for a template will end with success (a non-null template), but the template returned
+ * may be the {@link ComponentTemplate#isMissing() missing template}.
  * <p>
  * TODO: A more sophisticated, finer grained dependency manager.
  */
 public interface ComponentTemplateSource extends InvalidationEventHub
 {
     /**
-     * Provides access to a template. The template will be parsed as necessary.
+     * Provides access to a template. The template will be parsed as necessary. If no template for
+     * the exact component is found, then the template for the component's parent is returned. In
+     * this way, it is possible for a component to extend the behavior of its super-class without
+     * duplicating the super-class component's template.
+     * <p>
+     * In some cases, the empty template will be returned.
      * 
-     * @param componentName
-     *            the fully qualified class name of the component
+     * @param componentModel
+     *            model for the component whose template is to be accessed
      * @param locale
      *            the locale to find the template within
      * @return the cached template instance
      */
-    ComponentTemplate getTemplate(String componentName, Locale locale);
+    ComponentTemplate getTemplate(ComponentModel componentModel, Locale locale);
 }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java Tue Dec  5 09:35:05 2006
@@ -30,6 +30,7 @@
 import org.apache.tapestry.internal.util.URLChangeTracker;
 import org.apache.tapestry.ioc.Resource;
 import org.apache.tapestry.ioc.internal.util.ClasspathResource;
+import org.apache.tapestry.model.ComponentModel;
 
 /**
  * Service implementation that manages a cache of parsed component templates.
@@ -97,8 +98,10 @@
      * <p>
      * If a template doesn't exist, then the missing ComponentTemplate is returned.
      */
-    public ComponentTemplate getTemplate(String componentName, Locale locale)
+    public ComponentTemplate getTemplate(ComponentModel componentModel, Locale locale)
     {
+        String componentName = componentModel.getComponentClassName();
+
         MultiKey key = new MultiKey(componentName, locale);
 
         // First cache is key to resource.
@@ -107,7 +110,7 @@
 
         if (resource == null)
         {
-            resource = locateTemplateResource(componentName, locale);
+            resource = locateTemplateResource(componentModel, locale);
             _templateResources.put(key, resource);
         }
 
@@ -139,23 +142,46 @@
         return _parser.parseTemplate(r);
     }
 
-    private Resource locateTemplateResource(String componentName, Locale locale)
+    private Resource locateTemplateResource(ComponentModel initialModel, Locale locale)
     {
-        // TODO: Currently hard-coded to a ".html" extension! Need to locate the
-        // ComoponentModel and determine the correct extension from that.
+        ComponentModel model = initialModel;
+        while (model != null)
+        {
 
-        String path = componentName.replace('.', '/') + ".html";
-        Resource baseResource = new ClasspathResource(_loader, path);
-        Resource localized = baseResource.forLocale(locale);
+            Resource baseResource = baseResourceForModel(model);
+            Resource localized = baseResource.forLocale(locale);
+
+            // In a race condition, we may hit this method a couple of times, and overwrite previous
+            // results with identical new results.
 
-        // In a race condition, we may hit this method a couple of times, and overwrite previous
-        // results with identical new results.
+            // If found a properly localized version of the base resource for the model,
+            // then we've found a match (even if we had to ascend a couple of levels
+            // to reach it).
+
+            if (localized != null)
+                return localized;
+
+            // Otherwise, this component doesn't have its own template ... lets work up to its
+            // base class and check there.
+
+            model = model.getParentModel();
+        }
 
-        // If localized is null, then the resource simply doesn't exist. We still write the resource
-        // into the _templateResources map, but will supply the "missing template' inside
-        // parseTemplate().
+        // This will be a Resource whose URL is null, which will be picked up later and force the
+        // return of the empty template.
+
+        return baseResourceForModel(initialModel);
+    }
+
+    private Resource baseResourceForModel(ComponentModel model)
+    {
+        String componentName = model.getComponentClassName();
+
+        // TODO: Currently hard-coded to a ".html" extension!
+
+        String path = componentName.replace('.', '/') + ".html";
 
-        return localized != null ? localized : baseResource;
+        return new ClasspathResource(_loader, path);
     }
 
     /**

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextAssetFactory.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextAssetFactory.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextAssetFactory.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextAssetFactory.java Tue Dec  5 09:35:05 2006
@@ -17,8 +17,8 @@
 import org.apache.tapestry.Asset;
 import org.apache.tapestry.ioc.Resource;
 import org.apache.tapestry.services.AssetFactory;
-import org.apache.tapestry.services.WebContext;
-import org.apache.tapestry.services.WebRequest;
+import org.apache.tapestry.services.Context;
+import org.apache.tapestry.services.Request;
 
 /**
  * Implementation of {@link AssetFactory} for assets that are part of the web application context.
@@ -27,11 +27,11 @@
  */
 public class ContextAssetFactory implements AssetFactory
 {
-    private final WebRequest _request;
+    private final Request _request;
 
-    private final WebContext _context;
+    private final Context _context;
 
-    public ContextAssetFactory(WebRequest request, WebContext context)
+    public ContextAssetFactory(Request request, Context context)
     {
         _request = request;
         _context = context;

Copied: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextImpl.java (from r480115, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebContextImpl.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextImpl.java?view=diff&rev=482719&p1=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebContextImpl.java&r1=480115&p2=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextImpl.java&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebContextImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextImpl.java Tue Dec  5 09:35:05 2006
@@ -19,13 +19,15 @@
 
 import javax.servlet.ServletContext;
 
-import org.apache.tapestry.services.WebContext;
+import org.apache.tapestry.services.Context;
 
-public class WebContextImpl implements WebContext
+
+
+public class ContextImpl implements Context
 {
     private final ServletContext _servletContext;
 
-    public WebContextImpl(ServletContext servletContext)
+    public ContextImpl(ServletContext servletContext)
     {
         _servletContext = servletContext;
     }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextResource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextResource.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextResource.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ContextResource.java Tue Dec  5 09:35:05 2006
@@ -20,7 +20,7 @@
 
 import org.apache.tapestry.ioc.Resource;
 import org.apache.tapestry.ioc.internal.util.AbstractResource;
-import org.apache.tapestry.services.WebContext;
+import org.apache.tapestry.services.Context;
 
 /**
  * A resource stored with in the web application context.
@@ -29,9 +29,9 @@
 {
     private static final int PRIME = 37;
 
-    private WebContext _context;
+    private Context _context;
 
-    public ContextResource(WebContext context, String path)
+    public ContextResource(Context context, String path)
     {
         super(path);
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/DefaultRequestExceptionHandler.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/DefaultRequestExceptionHandler.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/DefaultRequestExceptionHandler.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/DefaultRequestExceptionHandler.java Tue Dec  5 09:35:05 2006
@@ -19,7 +19,7 @@
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.services.ExceptionReporter;
 import org.apache.tapestry.services.RequestExceptionHandler;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Response;
 
 /**
  * Default implementation of {@link RequestExceptionHandler} that displays the standard
@@ -33,10 +33,10 @@
 
     private final PageResponseRenderer _renderer;
 
-    private final WebResponse _response;
+    private final Response _response;
 
     public DefaultRequestExceptionHandler(RequestPageCache pageCache,
-            PageResponseRenderer renderer, WebResponse response)
+            PageResponseRenderer renderer, Response response)
     {
         _pageCache = pageCache;
         _renderer = renderer;

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java Tue Dec  5 09:35:05 2006
@@ -46,24 +46,27 @@
 import org.apache.tapestry.ioc.services.ThreadCleanupHub;
 import org.apache.tapestry.ioc.services.ThreadLocale;
 import org.apache.tapestry.ioc.services.TypeCoercer;
+import org.apache.tapestry.services.ApplicationGlobals;
 import org.apache.tapestry.services.ApplicationInitializer;
 import org.apache.tapestry.services.ApplicationInitializerFilter;
+import org.apache.tapestry.services.AssetFactory;
 import org.apache.tapestry.services.Binding;
 import org.apache.tapestry.services.BindingFactory;
 import org.apache.tapestry.services.BindingSource;
+import org.apache.tapestry.services.ClasspathAssetAliasManager;
 import org.apache.tapestry.services.ComponentClassResolver;
 import org.apache.tapestry.services.ComponentClassTransformWorker;
 import org.apache.tapestry.services.ComponentMessagesSource;
 import org.apache.tapestry.services.MarkupWriterFactory;
 import org.apache.tapestry.services.PageRenderInitializer;
 import org.apache.tapestry.services.PersistentFieldManager;
-import org.apache.tapestry.services.PersistentFieldStrategy;
 import org.apache.tapestry.services.RequestExceptionHandler;
 import org.apache.tapestry.services.RequestGlobals;
-import org.apache.tapestry.services.WebContext;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebRequestFilter;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.ResourceDigestGenerator;
+import org.apache.tapestry.services.Context;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.RequestFilter;
+import org.apache.tapestry.services.Response;
 
 @Id("tapestry.internal")
 public final class InternalModule
@@ -80,9 +83,9 @@
 
     private final ChainBuilder _chainBuilder;
 
-    private final WebRequest _request;
+    private final Request _request;
 
-    private final WebResponse _response;
+    private final Response _response;
 
     private final ThreadLocale _threadLocale;
 
@@ -94,9 +97,9 @@
             @InjectService("tapestry.ComponentClassResolver")
             ComponentClassResolver componentClassResolver,
             @InjectService("tapestry.ioc.ChainBuilder")
-            ChainBuilder chainBuilder, @Inject("infrastructure:request")
-            WebRequest request, @Inject("infrastructure:response")
-            WebResponse response, @InjectService("tapestry.ioc.ThreadLocale")
+            ChainBuilder chainBuilder, @Inject("infrastructure:Request")
+            Request request, @Inject("infrastructure:Response")
+            Response response, @InjectService("tapestry.ioc.ThreadLocale")
             ThreadLocale threadLocale)
     {
         _componentInstantiatorSource = componentInstantiatorSource;
@@ -152,9 +155,9 @@
         return new TemplateParserImpl(log);
     }
 
-    public PageElementFactory buildPageElementFactory(@Inject("infrastructure:typeCoercer")
-    TypeCoercer typeCoercer, @Inject("infrastructure:bindingSource")
-    BindingSource bindingSource, @Inject("infrastructure:componentMessagesSource")
+    public PageElementFactory buildPageElementFactory(@Inject("infrastructure:TypeCoercer")
+    TypeCoercer typeCoercer, @Inject("infrastructure:BindingSource")
+    BindingSource bindingSource, @Inject("infrastructure:ComponentMessagesSource")
     ComponentMessagesSource componentMessagesSource)
     {
         return new PageElementFactoryImpl(_componentInstantiatorSource, _componentClassResolver,
@@ -164,7 +167,7 @@
     public PageLoader buildPageLoader(@InjectService("PageElementFactory")
     PageElementFactory pageElementFactory, @InjectService("tapestry.BindingSource")
     BindingSource bindingSource, @InjectService("LinkFactory")
-    LinkFactory linkFactory, @Inject("infrastructure:persistentFieldManager")
+    LinkFactory linkFactory, @Inject("infrastructure:PersistentFieldManager")
     PersistentFieldManager persistentFieldManager)
     {
         PageLoaderImpl service = new PageLoaderImpl(_componentTemplateSource, pageElementFactory,
@@ -180,7 +183,7 @@
     }
 
     public PagePool buildPagePool(Log log, @InjectService("PageLoader")
-    PageLoader pageLoader, @Inject("infrastructure:componentMessagesSource")
+    PageLoader pageLoader, @Inject("infrastructure:ComponentMessagesSource")
     ComponentMessagesSource componentMessagesSource)
     {
         PagePoolImpl service = new PagePoolImpl(log, pageLoader, _threadLocale);
@@ -249,8 +252,8 @@
      * Adds a filter that checks for updates to classes and other resources. It is ordered
      * before:*.*.
      */
-    @Contribute("tapestry.WebRequestHandler")
-    public void contributeWebRequestFilters(OrderedConfiguration<WebRequestFilter> configuration,
+    @Contribute("tapestry.RequestHandler")
+    public void contributeRequestFilters(OrderedConfiguration<RequestFilter> configuration,
             @InjectService("tapestry.RequestGlobals")
             final RequestGlobals requestGlobals, @Inject("${tapestry.file-check-interval}")
             long checkInterval, @Inject("${tapestry.supported-locales}")
@@ -280,12 +283,12 @@
     public void contributeApplicationInitializerFilters(
             OrderedConfiguration<ApplicationInitializerFilter> configuration,
             @InjectService("tapestry.ioc.PropertyAccess")
-            final PropertyAccess propertyAccess, @Inject("infrastructure:typeCoercer")
+            final PropertyAccess propertyAccess, @Inject("infrastructure:TypeCoercer")
             final TypeCoercer typeCoercer)
     {
         ApplicationInitializerFilter setApplicationPackage = new ApplicationInitializerFilter()
         {
-            public void initializeApplication(WebContext context, ApplicationInitializer initializer)
+            public void initializeApplication(Context context, ApplicationInitializer initializer)
             {
                 String packageName = context
                         .getInitParameter(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM);
@@ -309,7 +312,7 @@
 
         ApplicationInitializerFilter clearCaches = new ApplicationInitializerFilter()
         {
-            public void initializeApplication(WebContext context, ApplicationInitializer initializer)
+            public void initializeApplication(Context context, ApplicationInitializer initializer)
             {
                 // Snuck in here is the logic to clear the PropertyAccess service's cache whenever
                 // the component class loader is invalidated.
@@ -498,13 +501,37 @@
         return new LinkFactoryImpl(_request, _response, _componentClassResolver);
     }
 
-    /**
-     * This exists as its own service just so that we can monitor it using logging.
-     * <p>
-     * TODO: Move this to TapestryModule?
-     */
-    public PersistentFieldStrategy buildSessionPersistentFieldStrategy()
+    public ResourceStreamer buildResourceStreamer()
+    {
+        return new ResourceStreamerImpl(_response);
+    }
+
+    public AssetFactory buildContextAssetFactory(@Inject("service:tapestry.ApplicationGlobals")
+    ApplicationGlobals globals)
+    {
+        ContextAssetFactory factory = new ContextAssetFactory(_request, globals.getContext());
+
+        return factory;
+    }
+
+    public AssetFactory buildClasspathAssetFactory(@InjectService("ResourceCache")
+    ResourceCache resourceCache, @Inject("infrastructure:ClasspathAssetAliasManager")
+    ClasspathAssetAliasManager aliasManager)
     {
-        return new SessionPersistentFieldStrategy(_request);
+        ClasspathAssetFactory factory = new ClasspathAssetFactory(resourceCache, aliasManager);
+
+        resourceCache.addInvalidationListener(factory);
+
+        return factory;
+    }
+
+    public ResourceCache buildResourceCache(@Inject("infrastructure:ResourceDigestGenerator")
+    ResourceDigestGenerator digestGenerator)
+    {
+        ResourceCacheImpl service = new ResourceCacheImpl(digestGenerator);
+
+        _updateListenerHub.addUpdateListener(service);
+
+        return service;
     }
-}
+}
\ No newline at end of file

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java Tue Dec  5 09:35:05 2006
@@ -31,14 +31,14 @@
 import org.apache.tapestry.ioc.util.StrategyRegistry;
 import org.apache.tapestry.runtime.Component;
 import org.apache.tapestry.services.ComponentClassResolver;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.Response;
 
 public class LinkFactoryImpl implements LinkFactory
 {
-    private final WebRequest _request;
+    private final Request _request;
 
-    private final WebResponse _response;
+    private final Response _response;
 
     private final ComponentClassResolver _componentClassResolver;
 
@@ -51,7 +51,7 @@
         void handle(T result, List context);
     }
 
-    public LinkFactoryImpl(WebRequest request, WebResponse response,
+    public LinkFactoryImpl(Request request, Response response,
             ComponentClassResolver componentClassResolver)
     {
         _request = request;

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java Tue Dec  5 09:35:05 2006
@@ -23,20 +23,20 @@
 import org.apache.commons.codec.net.URLCodec;
 import org.apache.tapestry.Link;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Response;
 
 /**
  * Starting implementation of {@link Link}. Currently does not support query parameters.
  */
 public class LinkImpl implements Link
 {
-    private final WebResponse _response;
+    private final Response _response;
 
     private final String _path;
 
     private Map<String, String> _parameters;
 
-    public LinkImpl(WebResponse response, String path)
+    public LinkImpl(Response response, String path)
     {
         _response = response;
         _path = path;

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java Tue Dec  5 09:35:05 2006
@@ -23,17 +23,17 @@
 import java.util.Set;
 
 import org.apache.tapestry.ioc.services.ThreadLocale;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebRequestFilter;
-import org.apache.tapestry.services.WebRequestHandler;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.RequestFilter;
+import org.apache.tapestry.services.RequestHandler;
+import org.apache.tapestry.services.Response;
 
 /**
  * Responsible for determining the locale for the current request. Currently, this is based on the
  * client's web browser. Later extensions will store the current locale as a cookie, or as a session
  * attribute.
  */
-public class LocalizationFilter implements WebRequestFilter
+public class LocalizationFilter implements RequestFilter
 {
     private final ThreadLocale _threadLocale;
 
@@ -89,7 +89,7 @@
         }
     }
 
-    public boolean service(WebRequest request, WebResponse response, WebRequestHandler handler)
+    public boolean service(Request request, Response response, RequestHandler handler)
             throws IOException
     {
         Locale locale = extractLocaleFromRequest(request);
@@ -99,7 +99,7 @@
         return handler.service(request, response);
     }
 
-    public Locale extractLocaleFromRequest(WebRequest request)
+    public Locale extractLocaleFromRequest(Request request)
     {
         String localeName = request.getLocale().toString();
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java Tue Dec  5 09:35:05 2006
@@ -151,7 +151,7 @@
         ComponentModel model = loadingElement.getComponentResources().getComponentModel();
 
         String componentClassName = model.getComponentClassName();
-        ComponentTemplate template = _templateSource.getTemplate(componentClassName, _locale);
+        ComponentTemplate template = _templateSource.getTemplate(model, _locale);
 
         // TODO: This needs some work, because the component may have defined embedded components
         // that we need to log errors about.

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java Tue Dec  5 09:35:05 2006
@@ -19,8 +19,8 @@
 import org.apache.tapestry.TapestryConstants;
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.services.Dispatcher;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.Response;
 
 /**
  * Dispatches incoming requests whose path ends with ".html". In these cases, the path is
@@ -38,7 +38,7 @@
         _cache = cache;
     }
 
-    public boolean dispatch(WebRequest request, WebResponse response) throws IOException
+    public boolean dispatch(Request request, Response response) throws IOException
     {
         String path = request.getPath();
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRenderer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRenderer.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRenderer.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRenderer.java Tue Dec  5 09:35:05 2006
@@ -17,7 +17,7 @@
 import java.io.IOException;
 
 import org.apache.tapestry.internal.structure.Page;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Response;
 
 /**
  * Service responsible for writing a full page markup response.
@@ -26,5 +26,5 @@
  */
 public interface PageResponseRenderer
 {
-    void renderPageResponse(Page page, WebResponse response) throws IOException;
+    void renderPageResponse(Page page, Response response) throws IOException;
 }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRendererImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRendererImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRendererImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageResponseRendererImpl.java Tue Dec  5 09:35:05 2006
@@ -21,7 +21,7 @@
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.services.MarkupWriterFactory;
 import org.apache.tapestry.services.PageRenderInitializer;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Response;
 
 public class PageResponseRendererImpl implements PageResponseRenderer
 {
@@ -36,7 +36,7 @@
         _pageRenderInitializer = pageRenderInitializer;
     }
 
-    public void renderPageResponse(Page page, WebResponse response) throws IOException
+    public void renderPageResponse(Page page, Response response) throws IOException
     {
         _pageRenderInitializer.setup();
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestGlobalsImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestGlobalsImpl.java?view=diff&rev=482719&r1=482718&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestGlobalsImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestGlobalsImpl.java Tue Dec  5 09:35:05 2006
@@ -18,8 +18,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.tapestry.services.RequestGlobals;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebResponse;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.Response;
 
 /**
  * Dumb data holder for per-request data.
@@ -32,9 +32,9 @@
 
     private HttpServletResponse _servletResponse;
 
-    private WebRequest _request;
+    private Request _request;
 
-    private WebResponse _response;
+    private Response _response;
 
     public void store(HttpServletRequest request, HttpServletResponse response)
     {
@@ -52,18 +52,18 @@
         return _servletResponse;
     }
 
-    public void store(WebRequest request, WebResponse response)
+    public void store(Request request, Response response)
     {
         _request = request;
         _response = response;
     }
 
-    public WebRequest getRequest()
+    public Request getRequest()
     {
         return _request;
     }
 
-    public WebResponse getResponse()
+    public Response getResponse()
     {
         return _response;
     }

Copied: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestImpl.java (from r480168, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebRequestImpl.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestImpl.java?view=diff&rev=482719&p1=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebRequestImpl.java&r1=480168&p2=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestImpl.java&r2=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/WebRequestImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/RequestImpl.java Tue Dec  5 09:35:05 2006
@@ -21,18 +21,18 @@
 import javax.servlet.http.HttpSession;
 
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
-import org.apache.tapestry.services.WebRequest;
-import org.apache.tapestry.services.WebSession;
+import org.apache.tapestry.services.Request;
+import org.apache.tapestry.services.Session;
 
 /**
- * Basic implementation of {@link org.apache.tapestry.services.WebRequest} that wraps around an
+ * Basic implementation of {@link org.apache.tapestry.services.Request} that wraps around an
  * {@link javax.servlet.http.HttpServletRequest}.
  */
-public class WebRequestImpl implements WebRequest
+public class RequestImpl implements Request
 {
     private final HttpServletRequest _request;
 
-    public WebRequestImpl(HttpServletRequest request)
+    public RequestImpl(HttpServletRequest request)
     {
         _request = request;
     }
@@ -62,16 +62,21 @@
         return _request.getContextPath();
     }
 
-    public WebSession getSession(boolean create)
+    public Session getSession(boolean create)
     {
         HttpSession session = _request.getSession(create);
 
-        return session == null ? null : new WebSessionImpl(session);
+        return session == null ? null : new SessionImpl(session);
     }
 
     public Locale getLocale()
     {
         return _request.getLocale();
+    }
+
+    public long getDateHeader(String name)
+    {
+        return _request.getDateHeader(name);
     }
 
 }

Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceCache.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceCache.java?view=auto&rev=482719
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceCache.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ResourceCache.java Tue Dec  5 09:35:05 2006
@@ -0,0 +1,54 @@
+// Copyright 2006 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.
+
+package org.apache.tapestry.internal.services;
+
+import org.apache.tapestry.internal.event.InvalidationEventHub;
+import org.apache.tapestry.ioc.Resource;
+import org.apache.tapestry.services.ResourceDigestGenerator;
+
+/**
+ * Caches information about resources on the classpath. In addition, acts as an invalidation hub for
+ * any resources for which information is obtained (when any of the resources are changed,
+ * invalidation listeners are notified so they can clear their caches).
+ */
+public interface ResourceCache extends InvalidationEventHub
+{
+    /**
+     * Returns true if the path requires that the client URL for the resource include a digest to
+     * validate that the client is authorized to access the resource.
+     * 
+     * @param resource
+     * @return true if digest is required for the resource
+     * @see ResourceDigestGenerator#requiresDigest(String)
+     */
+    boolean requiresDigest(Resource resource);
+
+    /**
+     * Returns the digest for the given path.
+     * 
+     * @param resource
+     * @return the digest, or null if the resource does not exist
+     */
+    String getDigest(Resource resource);
+
+    /**
+     * Returns the time modified for the resource.
+     * 
+     * @param resource
+     * @return the date time modified for the path, or a negative value if the resource does not
+     *         exist
+     */
+    long getTimeModified(Resource resource);
+}



Mime
View raw message