i cant see, that you add the URLRewriterRule object to the configuration object
with regards Sven Homburg Founder of the Chenille Kit Project http://www.chenillekit.org 2009/8/9 Angelo Chen <angelochen...@yahoo.com.hk> > > Hi, > > in a 5.1.0.5 app, i want to rewrite the url: > > http://127.0.0.1:8080/items/123 > > to > > http://127.0.0.1:8080/itemlist/123 > > what I did is, adding the following block to AppModule.java, but it is not > working, any idea why? > > Thanks, > > Angelo > > public static void > contributeURLRewriter(OrderedConfiguration<URLRewriterRule> configuration) > { > > System.out.println("contribute url rewriter"); // i can see this > line in the log > URLRewriterRule rule = new URLRewriterRule() { > > public Request process(Request request, URLRewriteContext > context) { > final String path = request.getPath(); > System.out.println("pathxx"); // i can not > see this in the > log > System.out.println(path); // i > can not see this in the log > if (path.equals("/items")) { > request = new SimpleRequestWrapper(request, "/itemlist"); > } > > return request; > > } > > public RewriteRuleApplicability applicability() { > return RewriteRuleApplicability.BOTH; > } > > }; > > } > > -- > View this message in context: > http://www.nabble.com/t5%3A-URLWriting%2C-is-this-correct--tp24884685p24884685.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >