Hi, @Thiago! :) Yes, you are right, I have no idea what am I doing. But with a help from master, I hope I will. My scenario is following: I have something as following: localhost:8083/MyApp/MyPage now I want to be something like localhost:8083/MyPage So, I have renamed my war file to ROOT file, and in order this to work, I have to rewrite incoming and outcoming URLS, so it would be something like RewriteRuleApplicability.BOTH; . So, I will have to have decodePage rule in which to substring everything before first "/" and process method to process my incoming and outcoming urls, to test whether path starts with
localhost:8083/MyApp/MyPage and to change it to localhost:8083/MyPage Is there any light in my vision, master? > Date: Mon, 17 Jun 2013 14:20:43 -0300 > Subject: Re: PageURL rewriting deprecated > From: thiag...@gmail.com > To: users@tapestry.apache.org > > Hi, Nomen! > > I didn't understand what you're trying to do nor you said what do you mean > by "it won't work". Do you want to rewrite incoming URLs (i.e. the ones > received by Tapestry) or outgoing ones (i.e. the ones generated by > Tapestry)? Anyway, your logic seems wrong, indicating you don't know yet > what you're doing. > > > On Mon, Jun 17, 2013 at 11:32 AM, Nomen Nomanum <getibi...@outlook.com>wrote: > > > 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 > > > > > > > > > > -- > Thiago