Re: t5: a default page for non exist path

2008-08-14 Thread Thiago H. de Paula Figueiredo
Em Thu, 14 Aug 2008 21:59:16 -0300, Angelo Chen <[EMAIL PROTECTED]> escreveu: Object onActivate(Object obj) obj will always be the first part of the path, example, if I pass www.mydomian.com/mypage/123 obj contains only 'mypage', is there a way to get also '123'? Use Object[], List or Event

Re: t5: a default page for non exist path

2008-08-14 Thread Angelo Chen
Hi Filip, This works very well, just a quick question, in this function: Object onActivate(Object obj) obj will always be the first part of the path, example, if I pass www.mydomian.com/mypage/123 obj contains only 'mypage', is there a way to get also '123'? angelo Filip S. Adamsen-2 wrote:

Re: t5: a default page for non exist path

2008-08-14 Thread Thiago H. de Paula Figueiredo
Em Thu, 14 Aug 2008 12:48:27 -0300, Filip S. Adamsen <[EMAIL PROTECTED]> escreveu: I'm not quite sure why Index works and Start doesn't. But it does. Start was the old Tapestry 5 page name for the root application path. Now it's Index, and not just for the root application path, but for an

Re: t5: a default page for non exist path

2008-08-14 Thread Filip S. Adamsen
I'm not quite sure why Index works and Start doesn't. But it does. Regarding URL rewriting, I guess that's possible. I wouldn't rely on this "feature", though. I'm not sure it's supposed to work like that. -Filip On 2008-08-14 16:52, Angelo Chen wrote: Hi Filip, renaming Start to Index work

Re: t5: a default page for non exist path

2008-08-14 Thread Angelo Chen
Hi Filip, renaming Start to Index works, don't know why? what's the difference between Start and Index? this means we can actually do some URL rewriting in the onActivate(Obj)? that will be easier then using a HttpServletRequestFilter, say if somebody type: www.mydomain.com/12345/profile then w

Re: t5: a default page for non exist path

2008-08-14 Thread Filip S. Adamsen
Hi, Try renaming Start to Index and see if that helps. -Filip On 2008-08-14 16:30, Angelo Chen wrote: hi, This is my Start.tml, i assume it's the same as Index.tml, but the first onActivate is not called, any idea? public class Start { Object onActivate(Object obj) { System.out.p

Re: t5: a default page for non exist path

2008-08-14 Thread Angelo Chen
hi, This is my Start.tml, i assume it's the same as Index.tml, but the first onActivate is not called, any idea? public class Start { Object onActivate(Object obj) { System.out.println("index a"); return PageNotFound.class; } // use Start to load the home page so th

Re: t5: a default page for non exist path

2008-08-14 Thread Filip S. Adamsen
Yes, it will. If the path isn't valid, Tapestry will pass it as the activation context to onActivate on your Index page. -Filip On 2008-08-14 15:16, Angelo Chen wrote: Thanks for the fast response, but I can not quite understand, my setup is like this: I have a Start.tmp which in turn call the

Re: t5: a default page for non exist path

2008-08-14 Thread Angelo Chen
Thanks for the fast response, but I can not quite understand, my setup is like this: I have a Start.tmp which in turn call the /Home page, based on what you said, the Start's onActive(Object obj) will be called if a invalid path is supplied? Filip S. Adamsen-2 wrote: > > Yeah, there is. At leas

Re: t5: a default page for non exist path

2008-08-14 Thread Filip S. Adamsen
Yeah, there is. At least I do that... I use onActivate on my Index page like this: Object onActivate(Object obj) { return ErrorNotFound.class; } Then, in my ErrorNotFound page, I set the HTTP Status Code to 404 to make the search engines happy: @Inject private RequestGlobals requ

t5: a default page for non exist path

2008-08-14 Thread Angelo Chen
hi, how to define a default page that will be shown to the browser if a non existing path is entered? example: www.mydomain.com/page1, page1 does not exist, tomcat will display a HTTP Status 404 - /page1, any way to re-direct this in t5 app to a t5 page? thanks. angelo -- View this message in c