You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/09/01 21:01:14 UTC

svn commit: r1164203 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry5/ main/java/org/apache/tapestry5/internal/services/ main/java/org/apache/tapestry5/internal/services/assets/ main/java/org/apache/tapestry5/services/ t...

Author: hlship
Date: Thu Sep  1 19:01:14 2011
New Revision: 1164203

URL: http://svn.apache.org/viewvc?rev=1164203&view=rev
Log:
TAP5-743: First pass at application folder work

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetDispatcher.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/AssetPathConstructorImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ClasspathAssetAliasManagerImplTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ContextAssetFactoryTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java Thu Sep  1 19:01:14 2011
@@ -304,6 +304,9 @@ public class SymbolConstants
      * object that was accessed during the request.
      * <p/>
      * This is provided as a performance enhancement for servers that do not use clustered sessions.
+     * <p/>
+     * The default is {@code true}, to preserve 5.2 behavior. For non-clustered applications (the majority), this value should be
+     * overridden to {@code false}. A future release of Tapestry may change the default.
      *
      * @since 5.3
      */
@@ -332,7 +335,7 @@ public class SymbolConstants
      * can cause a page load error if there is no matching component in the component's template. Although this is correct behavior,
      * it can make the upgrade from 5.2 to 5.3 difficult if an existing app had some "left over" event handler methods. Changing
      * this symbol to {@code false} is a temporary approach to resolving this problem.
-     * <p>
+     * <p/>
      * This symbol will be <em>ignored</em> in release 5.4 and removed in 5.5.
      *
      * @since 5.3
@@ -340,4 +343,21 @@ public class SymbolConstants
      */
     @Deprecated
     public static final String UNKNOWN_COMPONENT_ID_CHECK_ENABLED = "tapestry.compatibility.unknown-component-id-check-enabled";
+
+    /**
+     * The name of a folder in which the Tapestry application executes. Prior to 5.3, a Tapestry application always responded to all
+     * URLs in the context under the context root; by setting this to the name of a folder, the T5 URLs will be inside that folder only, and should
+     * match a corresponding entry in the {@code web.xml} configuration file.  This is useful when running multiple servlets within the same web application (such as when migrating
+     * from Tapestry 4 or some other framework, to Tapestry 5).
+     * <p>Effectively, if this symbol is set to a value, that folder name will be placed after the context path
+     * (typically "/") and before the locale, page name, or other prefix.  For example, if this symbol is set to "app", the {@code web.xml <url-pattern>} should be set to {@code /app/*}, and Tapestry will
+     * only be in invoked by the servlet container for requests inside the virtual {@code app} folder.
+     * <p/>
+     * This also affects the search for page templates (which are allowed within the web context). When set to a non-blank value, page templates are searched for in the folder, rather than in the root context.
+     * <p/>
+     * The default value is the empty string, which preserves Tapestry 5.2 behavior (and continues to be appropriate for most applications).
+     *
+     * @since 5.3
+     */
+    public static final String APPLICATION_FOLDER = "tapestry.application-folder";
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetDispatcher.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetDispatcher.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetDispatcher.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetDispatcher.java Thu Sep  1 19:01:14 2011
@@ -14,11 +14,6 @@
 
 package org.apache.tapestry5.internal.services;
 
-import java.io.IOException;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.tapestry5.SymbolConstants;
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.ioc.annotations.UsesMappedConfiguration;
@@ -28,10 +23,14 @@ import org.apache.tapestry5.services.Req
 import org.apache.tapestry5.services.Response;
 import org.apache.tapestry5.services.assets.AssetRequestHandler;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Map;
+
 /**
  * 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.
- * 
+ *
  * @see ResourceStreamer
  * @see ClasspathAssetAliasManager
  * @see AssetRequestHandler
@@ -45,12 +44,16 @@ public class AssetDispatcher implements 
 
     public AssetDispatcher(Map<String, AssetRequestHandler> configuration,
 
-    @Symbol(SymbolConstants.APPLICATION_VERSION)
-    String applicationVersion)
+                           @Symbol(SymbolConstants.APPLICATION_VERSION)
+                           String applicationVersion,
+
+                           @Symbol(SymbolConstants.APPLICATION_FOLDER) String applicationFolder)
     {
         this.configuration = configuration;
 
-        this.pathPrefix = RequestConstants.ASSET_PATH_PREFIX + applicationVersion + "/";
+        String folder = applicationFolder.equals("") ? "" : "/" + applicationFolder;
+
+        this.pathPrefix = folder + RequestConstants.ASSET_PATH_PREFIX + applicationVersion + "/";
     }
 
     public boolean dispatch(Request request, Response response) throws IOException

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java Thu Sep  1 19:01:14 2011
@@ -14,20 +14,16 @@
 
 package org.apache.tapestry5.internal.services;
 
-import java.util.Locale;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tapestry5.EventConstants;
-import org.apache.tapestry5.EventContext;
-import org.apache.tapestry5.Link;
-import org.apache.tapestry5.SymbolConstants;
-import org.apache.tapestry5.TapestryConstants;
+import org.apache.tapestry5.*;
 import org.apache.tapestry5.internal.InternalConstants;
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.services.*;
 
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 public class ComponentEventLinkEncoderImpl implements ComponentEventLinkEncoder
 {
     private final ComponentClassResolver componentClassResolver;
@@ -48,6 +44,8 @@ public class ComponentEventLinkEncoderIm
 
     private final boolean encodeLocaleIntoPath;
 
+    private final String applicationFolder;
+
     private static final int BUFFER_SIZE = 100;
 
     private static final char SLASH = '/';
@@ -62,16 +60,7 @@ public class ComponentEventLinkEncoderIm
     // path is most likely a page render request. After the optional event name,
     // the next piece is the action context, which is the remainder of the path.
 
-    private final Pattern PATH_PATTERN = Pattern.compile(
-
-    "^/" + // The leading slash is recognized but skipped
-            "(((\\w+)/)*(\\w+))" + // A series of folder names leading up to the page name, forming
-            // the logical page name
-            "(\\.(\\w+(\\.\\w+)*))?" + // The first dot separates the page name from the nested
-            // component id
-            "(\\:(\\w+))?" + // A colon, then the event type
-            "(/(.*))?", // A slash, then the action context
-            Pattern.COMMENTS);
+    private final Pattern PATH_PATTERN;
 
     // Constants for the match groups in the above pattern.
     private static final int LOGICAL_PAGE_NAME = 1;
@@ -80,10 +69,10 @@ public class ComponentEventLinkEncoderIm
     private static final int CONTEXT = 11;
 
     public ComponentEventLinkEncoderImpl(ComponentClassResolver componentClassResolver,
-            ContextPathEncoder contextPathEncoder, LocalizationSetter localizationSetter, Request request,
-            Response response, RequestSecurityManager requestSecurityManager, BaseURLSource baseURLSource,
-            PersistentLocale persistentLocale, @Symbol(SymbolConstants.ENCODE_LOCALE_INTO_PATH)
-            boolean encodeLocaleIntoPath)
+                                         ContextPathEncoder contextPathEncoder, LocalizationSetter localizationSetter, Request request,
+                                         Response response, RequestSecurityManager requestSecurityManager, BaseURLSource baseURLSource,
+                                         PersistentLocale persistentLocale, @Symbol(SymbolConstants.ENCODE_LOCALE_INTO_PATH)
+    boolean encodeLocaleIntoPath, @Symbol(SymbolConstants.APPLICATION_FOLDER) String applicationFolder)
     {
         this.componentClassResolver = componentClassResolver;
         this.contextPathEncoder = contextPathEncoder;
@@ -94,6 +83,21 @@ public class ComponentEventLinkEncoderIm
         this.baseURLSource = baseURLSource;
         this.persistentLocale = persistentLocale;
         this.encodeLocaleIntoPath = encodeLocaleIntoPath;
+        this.applicationFolder = applicationFolder;
+
+        String folderPattern = applicationFolder.equals("") ? "" : SLASH + applicationFolder;
+
+        PATH_PATTERN = Pattern.compile(
+
+                "^/" + // The leading slash is recognized but skipped
+                        folderPattern + // The folder containing the application (TAP5-743)
+                        "(((\\w+)/)*(\\w+))" + // A series of folder names leading up to the page name, forming
+                        // the logical page name (may include the locale name)
+                        "(\\.(\\w+(\\.\\w+)*))?" + // The first dot separates the page name from the nested
+                        // component id
+                        "(\\:(\\w+))?" + // A colon, then the event type
+                        "(/(.*))?", // A slash, then the action context
+                Pattern.COMMENTS);
     }
 
     public Link createPageRenderLink(PageRenderRequestParameters parameters)
@@ -106,7 +110,7 @@ public class ComponentEventLinkEncoderIm
 
         builder.append(request.getContextPath());
 
-        encodeLocale(builder);
+        encodeAppFolderAndLocale(builder);
 
         builder.append(SLASH);
 
@@ -125,21 +129,13 @@ public class ComponentEventLinkEncoderIm
         return link;
     }
 
-    private String encodePageName(String pageName)
+    private void encodeAppFolderAndLocale(StringBuilder builder)
     {
-        if (pageName.equalsIgnoreCase("index"))
-            return "";
-
-        String encoded = pageName.toLowerCase();
-
-        if (!encoded.endsWith("/index"))
-            return encoded;
-
-        return encoded.substring(0, encoded.length() - 6);
-    }
+        if (!applicationFolder.equals(""))
+        {
+            builder.append(SLASH).append(applicationFolder);
+        }
 
-    private void encodeLocale(StringBuilder builder)
-    {
         if (encodeLocaleIntoPath)
         {
             Locale locale = persistentLocale.get();
@@ -152,6 +148,19 @@ public class ComponentEventLinkEncoderIm
         }
     }
 
+    private String encodePageName(String pageName)
+    {
+        if (pageName.equalsIgnoreCase("index"))
+            return "";
+
+        String encoded = pageName.toLowerCase();
+
+        if (!encoded.endsWith("/index"))
+            return encoded;
+
+        return encoded.substring(0, encoded.length() - 6);
+    }
+
     public Link createComponentEventLink(ComponentEventRequestParameters parameters, boolean forForm)
     {
         StringBuilder builder = new StringBuilder(BUFFER_SIZE);
@@ -167,7 +176,7 @@ public class ComponentEventLinkEncoderIm
 
         builder.append(request.getContextPath());
 
-        encodeLocale(builder);
+        encodeAppFolderAndLocale(builder);
 
         builder.append(SLASH);
         builder.append(activePageName.toLowerCase());
@@ -277,7 +286,9 @@ public class ComponentEventLinkEncoderIm
 
         // Ignore trailing slashes in the path.
         while (extendedName.endsWith("/"))
+        {
             extendedName = extendedName.substring(0, extendedName.length() - 1);
+        }
 
         int slashx = extendedName.indexOf('/');
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/AssetPathConstructorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/AssetPathConstructorImpl.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/AssetPathConstructorImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/AssetPathConstructorImpl.java Thu Sep  1 19:01:14 2011
@@ -1,4 +1,4 @@
-// Copyright 2010 The Apache Software Foundation
+// Copyright 2010, 2011 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.
@@ -28,11 +28,17 @@ public class AssetPathConstructorImpl im
 
     public AssetPathConstructorImpl(Request request,
 
-    @Symbol(SymbolConstants.APPLICATION_VERSION)
-    String applicationVersion)
+                                    @Symbol(SymbolConstants.APPLICATION_VERSION)
+                                    String applicationVersion,
+
+                                    @Symbol(SymbolConstants.APPLICATION_FOLDER)
+                                    String applicationFolder)
     {
         this.request = request;
-        this.prefix = RequestConstants.ASSET_PATH_PREFIX + applicationVersion + "/";
+
+        String folder = applicationFolder.equals("") ? "" : "/" + applicationFolder;
+
+        this.prefix = folder + RequestConstants.ASSET_PATH_PREFIX + applicationVersion + "/";
     }
 
     public String constructAssetPath(String virtualFolder, String path)

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java Thu Sep  1 19:01:14 2011
@@ -2373,6 +2373,8 @@ public final class TapestryModule
         configuration.add(SymbolConstants.PAGE_SOURCE_ACTIVE_WINDOW, "15 m");
 
         configuration.add(SymbolConstants.UNKNOWN_COMPONENT_ID_CHECK_ENABLED, true);
+
+        configuration.add(SymbolConstants.APPLICATION_FOLDER, "");
     }
 
     /**

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ClasspathAssetAliasManagerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ClasspathAssetAliasManagerImplTest.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ClasspathAssetAliasManagerImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ClasspathAssetAliasManagerImplTest.java Thu Sep  1 19:01:14 2011
@@ -86,7 +86,7 @@ public class ClasspathAssetAliasManagerI
         replay();
 
         ClasspathAssetAliasManager manager = new ClasspathAssetAliasManagerImpl(new AssetPathConstructorImpl(request,
-                APP_VERSION), configuration());
+                APP_VERSION, ""), configuration());
 
         String expectedPath = "/ctx" + RequestConstants.ASSET_PATH_PREFIX + APP_VERSION + "/" + expectedClientURL;
         assertEquals(manager.toClientURL(resourcePath), expectedPath);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java Thu Sep  1 19:01:14 2011
@@ -50,7 +50,7 @@ public class ComponentEventDispatcherTes
 
         Dispatcher dispatcher = new ComponentEventDispatcher(null,
                 new ComponentEventLinkEncoderImpl(null, contextPathEncoder, null, request,
-                        response, null, null, null, true));
+                        response, null, null, null, true, ""));
 
         assertFalse(dispatcher.dispatch(request, response));
 
@@ -160,7 +160,7 @@ public class ComponentEventDispatcherTes
 
         Dispatcher dispatcher = new ComponentEventDispatcher(handler,
                 new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls, request,
-                        response, null, null, null, true));
+                        response, null, null, null, true, ""));
 
         assertTrue(dispatcher.dispatch(request, response));
 
@@ -200,7 +200,7 @@ public class ComponentEventDispatcherTes
 
         Dispatcher dispatcher = new ComponentEventDispatcher(handler,
                 new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls, request,
-                        response, null, null, null, true));
+                        response, null, null, null, true, ""));
 
         assertTrue(dispatcher.dispatch(request, response));
 
@@ -224,7 +224,7 @@ public class ComponentEventDispatcherTes
 
         Dispatcher dispatcher = new ComponentEventDispatcher(null,
                 new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls, request,
-                        response, null, null, null, true));
+                        response, null, null, null, true, ""));
 
         assertFalse(dispatcher.dispatch(request, response));
 
@@ -262,7 +262,7 @@ public class ComponentEventDispatcherTes
 
         Dispatcher dispatcher = new ComponentEventDispatcher(handler,
                 new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, localizationSetter,
-                        request, response, null, null, null, true));
+                        request, response, null, null, null, true, ""));
 
         assertTrue(dispatcher.dispatch(request, response));
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java Thu Sep  1 19:01:14 2011
@@ -63,7 +63,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoder encoder = new ComponentEventLinkEncoderImpl(null, contextPathEncoder, null, request,
-                response, manager, null, null, false);
+                response, manager, null, null, false, "");
 
         PageRenderRequestParameters parameters = new PageRenderRequestParameters("MyPage", new EmptyEventContext());
 
@@ -90,7 +90,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoder encoder = new ComponentEventLinkEncoderImpl(null, contextPathEncoder, null, request,
-                response, manager, null, null, false);
+                response, manager, null, null, false, "");
 
         PageRenderRequestParameters parameters = new PageRenderRequestParameters("admin/Index", new ArrayEventContext(
                 typeCoercer, "abc"));
@@ -118,7 +118,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoder encoder = new ComponentEventLinkEncoderImpl(null, contextPathEncoder, null, request,
-                response, manager, null, null, false);
+                response, manager, null, null, false, "");
 
         PageRenderRequestParameters parameters = new PageRenderRequestParameters("Index", new EmptyEventContext());
 
@@ -146,7 +146,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
-                request, response, null, null, null, true);
+                request, response, null, null, null, true, "");
 
         PageRenderRequestParameters parameters = linkEncoder.decodePageRenderRequest(request);
 
@@ -171,7 +171,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
-                request, response, null, null, null, true);
+                request, response, null, null, null, true, "");
 
         PageRenderRequestParameters parameters = linkEncoder.decodePageRenderRequest(request);
 
@@ -197,7 +197,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
-                request, response, null, null, null, true);
+                request, response, null, null, null, true, "");
 
         PageRenderRequestParameters parameters = linkEncoder.decodePageRenderRequest(request);
 
@@ -238,7 +238,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
-                request, null, null, null, null, true);
+                request, null, null, null, null, true, "");
 
         PageRenderRequestParameters parameters = linkEncoder.decodePageRenderRequest(request);
 
@@ -279,7 +279,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
-                request, null, null, null, null, true);
+                request, null, null, null, null, true, "");
 
         PageRenderRequestParameters parameters = linkEncoder.decodePageRenderRequest(request);
 
@@ -324,7 +324,7 @@ public class ComponentEventLinkEncoderIm
         replay();
 
         ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
-                request, null, null, null, null, true);
+                request, null, null, null, null, true, "");
 
         PageRenderRequestParameters parameters = linkEncoder.decodePageRenderRequest(request);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ContextAssetFactoryTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ContextAssetFactoryTest.java?rev=1164203&r1=1164202&r2=1164203&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ContextAssetFactoryTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ContextAssetFactoryTest.java Thu Sep  1 19:01:14 2011
@@ -54,7 +54,7 @@ public class ContextAssetFactoryTest ext
 
         replay();
 
-        AssetFactory factory = new ContextAssetFactory(new AssetPathConstructorImpl(request, "4.5.6"), context,
+        AssetFactory factory = new ContextAssetFactory(new AssetPathConstructorImpl(request, "4.5.6", ""), context,
                 new IdentityAssetPathConverter());
 
         Asset asset = factory.createAsset(r);