Your module is great, @Thiago, however it seems to me I can't setup the 
following scenario:

Substring everything before second /, ie 

localhost:8080/X/Y/Z/
where X stands for app name. I have tried the following, but it won't work.

                URLRewriterRule rule1 = new URLRewriterRule() {
                        public Request process(Request request, 
URLRewriteContext context) {                            String serverName = 
request.getServerName();                            String path = 
request.getPath().toLowerCase();                          if 
(serverName.equals("localhost") && path.equals("/X")) {                         
             request = new SimpleRequestWrapper(request, "/");                  
             }                               return request;
                        }
                        public RewriteRuleApplicability applicability() {       
                        return RewriteRuleApplicability.OUTBOUND;               
        }
                };so that final output would be something like 
localhost:8080/Y/Z/
instead of 
localhost:8080/X/Y/Z/


> To: users@tapestry.apache.org
> Subject: Re: PageURL rewriting deprecated
> Date: Sun, 16 Jun 2013 16:56:21 -0300
> From: thiag...@gmail.com
> 
> On Sun, 16 Jun 2013 14:06:22 -0300, Howard Lewis Ship <hls...@gmail.com>  
> wrote:
> 
> > The original implementation of url rewriting was  flawed and replaced.
> 
> Why flawed? Besides a couple bugs, it worked. I'd say it has some  
> advantages and disadvantages over the current Link Rewriter API. IMHO URL  
> rewriter is better at incoming URLs and Link Rewriter at outgoing ones.
> 
> I ported it (the Tapestry 5.1.0.5 URL rewriter API) to Tapestry 5.3.x and  
> the code is here: https://github.com/thiagohp/tapestry-url-rewriter.
> 
> -- 
> Thiago H. de Paula Figueiredo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
                                          

Reply via email to