Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-19 Thread Bo Gao
> :) Your subject is "how to redirect..." Sorry for my mistake. How can I use http://download.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getRequestDispatcher(java.lang.String) in a tapestry page? On Jul 19, 2011, at 12:44 PM, Josh Canfield wrote: >> It's a good way to do the red

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Josh Canfield
> It's a good way to do the redirect. > But I want the url remain /download, so it's a url rewrite, not redirect. :) Your subject is "how to redirect..." With tapestry rewriting you can change an incoming URI so that it matches a tapestry page or component event and you can rewrite outgoing links

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Bo Gao
> I'm not sure why you'd want to do this from the link transformer. Can > you explain? Now I have to Integrate struts and tapestry, let them work together. There is an old rewrite rule, /download to /page.do?p=download Now I use link transformer to do the rewrite. > My first choice would be to le

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Josh Canfield
I'm not sure why you'd want to do this from the link transformer. Can you explain? My first choice would be to let it reach a page and have that page class do the redirect from an onActivate handler. Josh On Mon, Jul 18, 2011 at 7:11 AM, Bo Gao wrote: >> Just return a URL instance of a non-tape

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Bo Gao
> Just return a URL instance of a non-tapestry page from the event > handler. I think that will do I do this in a PageRenderLinkTransformer, the interface is public PageRenderRequestParameters decodePageRenderRequest(Request request) ; So I must return PageRenderRequestParameters, The first param

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Taha Hafeez
Just return a URL instance of a non-tapestry page from the event handler. I think that will do On Mon, Jul 18, 2011 at 4:04 PM, Bo Gao wrote: > Thank you for your response, > > For example I want to redirect /download to another url "download.do" > But the download.do is not a tapestry page, it'

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Bo Gao
Thank you for your response, For example I want to redirect /download to another url "download.do" But the download.do is not a tapestry page, it's not handled by tapestry. How to do this? On Jul 18, 2011, at 6:18 PM, Taha Hafeez wrote: > Hi > > http://blog.tapestry5.de/index.php/2010/09/06/n

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Taha Hafeez
Hi http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/ regards Taha On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao wrote: > I want to redirect some url to another url, the url is not a tapestry page. > but decodePageRenderRequest returns a PageRenderRequestParameters > How can I do th