Revision: 598
          http://stripes.svn.sourceforge.net/stripes/?rev=598&view=rev
Author:   bengunter
Date:     2007-08-16 05:36:00 -0700 (Thu, 16 Aug 2007)

Log Message:
-----------
Backed out a change from revision 590 that forwards to the @UrlBinding base 
path instead of to the original request URI. If DispatcherServlet is mapped to 
an extension and that extension is specified in a trailing literal in 
@UrlBinding (e.g. /some/action/{foo}.bar), then the extension is lost on 
forward and thus is not invoked in such a scenario.

Revision Links:
--------------
    http://stripes.svn.sourceforge.net/stripes/?rev=590&view=rev

Modified Paths:
--------------
    trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java

Modified: 
trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java     
2007-08-10 02:47:55 UTC (rev 597)
+++ trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java     
2007-08-16 12:36:00 UTC (rev 598)
@@ -291,8 +291,14 @@
 
         StringBuilder url = null;
         if (rewrite) {
+            // get request URI sans the context path
+            int contextLength = request.getContextPath().length();
+            if (contextLength > 1)
+                url = new 
StringBuilder(request.getRequestURI().substring(contextLength));
+            else
+                url = new StringBuilder(request.getRequestURI());
+
             // append the binding parameters to the query string
-            url = new StringBuilder(binding.getPath());
             char separator = '?';
             for (UrlBindingParameter p : binding.getParameters()) {
                 String name = p.getName();


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to