[seam-commits] Seam SVN: r8016 - branches/Seam_2_0/src/main/org/jboss/seam/mock.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Apr 24 08:26:51 EDT 2008
Author: dan.j.allen
Date: 2008-04-24 08:26:51 -0400 (Thu, 24 Apr 2008)
New Revision: 8016
Modified:
branches/Seam_2_0/src/main/org/jboss/seam/mock/MockExternalContext.java
Log:
JBSEAM-2924
Modified: branches/Seam_2_0/src/main/org/jboss/seam/mock/MockExternalContext.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/mock/MockExternalContext.java 2008-04-24 11:39:41 UTC (rev 8015)
+++ branches/Seam_2_0/src/main/org/jboss/seam/mock/MockExternalContext.java 2008-04-24 12:26:51 UTC (rev 8016)
@@ -90,7 +90,7 @@
@Override
public String encodeActionURL(String url)
{
- return url;
+ return encodeURL(url);
}
@Override
@@ -102,7 +102,7 @@
@Override
public String encodeResourceURL(String url)
{
- return url;
+ return encodeURL(url);
}
@Override
@@ -530,4 +530,20 @@
return response.getContentType();
}
+ /**
+ * Attempt to encode the URL, falling back to
+ * an identity function if the response has
+ * not been set on this mock context. This
+ * functionality is needed in order for
+ * the ExceptionFilter to maintain the session id
+ * when url rewriting is used.
+ */
+ protected String encodeURL(String url)
+ {
+ if (response != null) {
+ String encodedUrl = response.encodeURL(url);
+ url = (encodedUrl != null ? encodedUrl : url);
+ }
+ return url;
+ }
}
More information about the seam-commits
mailing list