Re: Redirect Question
Ok, you managed to confuse me now. :-) On 5/28/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: What is "/app"? Is it a page? Tapestry 5 doesn't use a mapping to a servlet named "/app". T5 should see that URL, identify it as a page render request and see that there's no such page, and let the servlet container send a normal 404 error result. I followed the T5 tutorial and it uses http://localhost:8080/hilo (so app=hilo, or at least that's what I intended to refer to). Using onActivate() works for http://localhost:8080/hilo/start (redirects to http://localhost:8080/hilo/new_page but not for http://localhost:8080/hilo (just gives me an empty page). Is the tutorial outdated? I got the impression it was working quite well. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect Question
What is "/app"? Is it a page? Tapestry 5 doesn't use a mapping to a servlet named "/app". T5 should see that URL, identify it as a page render request and see that there's no such page, and let the servlet container send a normal 404 error result. On 5/28/07, Hilco Wijbenga <[EMAIL PROTECTED]> wrote: On 5/28/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > It's easy if you do it from activate event handler method (onActivate()), > just return the page name or page instance to redirect to. Once you > progress as far as the SetupRender phase, you are committed to rendering a > response. Yes, that's what I'd found on the mailinglist. It doesn't seem to work, though, when the Start page is implied (www.example.com/app) instead of explicit (www.example.com/app/start)? www.example.com/app --> blank page www.example.com/app/start --> redirects as expected What do I need to do to get www.example.com/app to redirect as well? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com
Re: Redirect Question
On 5/28/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: It's easy if you do it from activate event handler method (onActivate()), just return the page name or page instance to redirect to. Once you progress as far as the SetupRender phase, you are committed to rendering a response. Yes, that's what I'd found on the mailinglist. It doesn't seem to work, though, when the Start page is implied (www.example.com/app) instead of explicit (www.example.com/app/start)? www.example.com/app --> blank page www.example.com/app/start --> redirects as expected What do I need to do to get www.example.com/app to redirect as well? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect Question
It's easy if you do it from activate event handler method (onActivate()), just return the page name or page instance to redirect to. Once you progress as far as the SetupRender phase, you are committed to rendering a response. On 5/27/07, Hilco Wijbenga <[EMAIL PROTECTED]> wrote: On 5/27/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > void setup() > { >throw new PageRedirectException("YourPageName"); > } So what about T5? I found "onActivate()" in the mailinglist and that works ... partially. Requesting www.example.com/app/start redirects as expected [onActivate() is in Start.java] but requesting www.example.com/app just yields a blank page? I can get it to work using @Inject private Response response; public void onActivate() throws IOException { response.sendRedirect("PageName"); } but that seems a bit ugly. What is the proper Tapestry (5) way to redirect? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com
Re: Redirect Question
On 5/27/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: void setup() { throw new PageRedirectException("YourPageName"); } So what about T5? I found "onActivate()" in the mailinglist and that works ... partially. Requesting www.example.com/app/start redirects as expected [onActivate() is in Start.java] but requesting www.example.com/app just yields a blank page? I can get it to work using @Inject private Response response; public void onActivate() throws IOException { response.sendRedirect("PageName"); } but that seems a bit ugly. What is the proper Tapestry (5) way to redirect? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect Question
Thx a mil mate... -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Sunday, May 27, 2007 9:23 PM To: Tapestry users Subject: Re: Redirect Question void setup() { throw new PageRedirectException("YourPageName"); } ? On 5/27/07, Jonathan Glanz <[EMAIL PROTECTED]> wrote: > > In my setup function I need to be able to redirect to another page, any > ideas? > > > > -thx, Jon > > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect Question
void setup() { throw new PageRedirectException("YourPageName"); } ? On 5/27/07, Jonathan Glanz <[EMAIL PROTECTED]> wrote: In my setup function I need to be able to redirect to another page, any ideas? -thx, Jon -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Redirect Question
In my setup function I need to be able to redirect to another page, any ideas? -thx, Jon