Re: T5: redirect page in a Dispatcher

2008-07-08 Thread Weisu
Thanks Francois! I will give it a go. Weisu Francois Armand wrote: > > Weisu wrote: >> Hi All, I am trying to do the same, but after Login page how do I go back >> to >> the original page. >> Thanks in advance! >> Weisu >> > You will have to store the previous in some fashion, and return it o

Re: T5: redirect page in a Dispatcher

2008-07-07 Thread Francois Armand
Weisu wrote: Hi All, I am trying to do the same, but after Login page how do I go back to the original page. Thanks in advance! Weisu You will have to store the previous in some fashion, and return it on the login success. I believe that there is no predifined service for that, but it should

Re: T5: redirect page in a Dispatcher

2008-07-07 Thread Weisu
Hi All, I am trying to do the same, but after Login page how do I go back to the original page. Thanks in advance! Weisu Angelo Chen wrote: > > Thanks Peter and Marcelo, > your tip works, for the intended page, it is request.getPath(). > > A.C. > > > Peter Stavrinides wrote: >> >> response.s

Re: T5: redirect page in a Dispatcher

2007-12-21 Thread jeffrey ai
Yes, that's the one. You could use it rewrite inbound and outbound URLs. Cheers, Jeffrey Ai Angelo Chen wrote: > > Hi Jeffrey, > > do you meant the third party URLRewriter, http://tuckey.org/urlrewrite/ > this one? > > jeffrey ai wrote: >> >> Angelo, >> >> You could use URLRewriter to do

Re: T5: redirect page in a Dispatcher

2007-12-20 Thread Angelo Chen
Hi Jeffrey, do you meant the third party URLRewriter, http://tuckey.org/urlrewrite/ this one? jeffrey ai wrote: > > Angelo, > > You could use URLRewriter to do this job for you. For details, pls see my > post at the following thread: > http://www.nabble.com/url-rewriting-in-Tapestry-5-to128

Re: T5: redirect page in a Dispatcher

2007-12-20 Thread jeffrey ai
Angelo, You could use URLRewriter to do this job for you. For details, pls see my post at the following thread: http://www.nabble.com/url-rewriting-in-Tapestry-5-to12823397.html#a12823397 Cheers, Jeffrey Ai Angelo Chen wrote: > > Hi, > > T5's url is nice looking, however I have a need to ha

Re: T5: redirect page in a Dispatcher

2007-12-20 Thread Angelo Chen
Thanks Peter and Marcelo, your tip works, for the intended page, it is request.getPath(). A.C. Peter Stavrinides wrote: > > response.sendRedirect(arg0), a redirect should not be used for an error > > -- View this message in context: http://www.nabble.com/T5%3A-redirect-page-in-a-Dispatch

Re: T5: redirect page in a Dispatcher

2007-12-20 Thread Marcelo Lotif
Hi Angelo, I use the sendRedirect, like peter said, instead of throw a RuntimeException: response.sendRedirect(request.getContextPath() + "/start"); if you want to execute a method on the page, you should try something like "/start.init/STRING_VALUE". You must have a init(String arg) waiting on t

Re: T5: redirect page in a Dispatcher

2007-12-20 Thread Peter Stavrinides
Hi Angelo, You already have the request and response object what else would you need? the Dispatcher example is great, but a changed a few lines, for errors I use: response.sendError(401, "Authentication failed") instead of the exception which I feel is not appropriate,for a redirect you coul

T5: redirect page in a Dispatcher

2007-12-19 Thread Angelo Chen
Hi, T5's url is nice looking, however I have a need to have something different, example: www.mysite.com/profile/98765 98765 is parameter passed to the page profile, can we change the order somehow: www.mysite.com/98765/profile www.mysite.com/98765/inbox www.mysite.com/98765/sent any hint to

T5: redirect page in a Dispatcher

2007-12-19 Thread Angelo Chen
Hi, I'm reading http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2 Tapestry5HowToCreateADispatcher2 , it works, but how to redirect a page in the dispatch? here is the code: if(!canAccess) { throw new RuntimeException("Access violation!");