Re: No 404 error is raised

2012-09-07 Thread Alejandro Scandroli
Alex, as a workaround for almost the same issue I wrote this module: https://gist.github.com/3360101 It accomplishes three things: *) The default PageRenderDispatcher will skip Index pages. *) There is a new Dispatcher that will deal with the Index pages but it's configured after all the other dis

Re: No 404 error is raised

2012-09-05 Thread Kalle Korhonen
On Wed, Sep 5, 2012 at 1:22 PM, Alex Kotchnev wrote: > This is quite a pesky problem. I tried going w/ the Start page approach > mentioned in > https://issues.apache.org/jira/browse/TAP5-879?attachmentOrder=desc ; > however, as it appears the approach w/ Start pages no longer works (and > they're

Re: No 404 error is raised

2012-09-05 Thread Alex Kotchnev
This is quite a pesky problem. I tried going w/ the Start page approach mentioned in https://issues.apache.org/jira/browse/TAP5-879?attachmentOrder=desc ; however, as it appears the approach w/ Start pages no longer works (and they're deprecated anyway). It certainly is a surprise when the app nev

Re: No 404 error is raised

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 19:18:30 -0300, Howard Lewis Ship wrote: I'm considering a change for Tapestry 5.4 where the ValueEncoder, responsible for converting portions of the URL into the page activation context, will have a new method that defines what it expects to see in its portion of the URL,

Re: No 404 error is raised

2012-08-20 Thread Howard Lewis Ship
I'm considering a change for Tapestry 5.4 where the ValueEncoder, responsible for converting portions of the URL into the page activation context, will have a new method that defines what it expects to see in its portion of the URL, in terms of a regular expression. Thus a URL such as: /account/1

Re: No 404 error is raised

2012-08-20 Thread RJB III
Well I got it to work by combining Info from here: http://thread.gmane.org/gmane.comp.java.tapestry.user/64654/focus=64655 and here: http://tapestry.apache.org/error-page-recipe.html Index.java pag

Re: No 404 error is raised

2010-10-16 Thread Josh Canfield
> Actually 5.2 has an HttpError class you can return from the activate > event, thus: Cool, I missed that. On Sat, Oct 16, 2010 at 10:55 AM, Howard Lewis Ship wrote: > Actually 5.2 has an HttpError class you can return from the activate > event, thus: > >  Object onActivate(EventContext context)

Re: No 404 error is raised

2010-10-16 Thread Howard Lewis Ship
Actually 5.2 has an HttpError class you can return from the activate event, thus: Object onActivate(EventContext context) { _context = context; if (_context.getCount() == 0) return null; return new HttpError(404, "Resource not found."); } On Sat, Oct 16, 2010 at 9:45 AM, Jo

Re: No 404 error is raised

2010-10-16 Thread Josh Canfield
> Can somebody please explain how I can work around this for the novice here? It depends on what you wan to do. If you are looking to prevent tapestry from handling specific urls then you can contribute to the ignored paths filter as described here: http://tapestry.apache.org/tapestry5/guide/conf

Re: No 404 error is raised

2010-10-16 Thread stephanos
> I think the best approach is to leverage the ignored paths mechanism. > That is early in the response processing pipeline, and will have a > good chance to ignore what should be ignored. Can somebody please explain how I can work around this for the novice here? :) Help very appreciated! --

Re: No 404 error is raised

2010-10-15 Thread Howard Lewis Ship
This is a tricky error to fix. At issue is the fact that the page activation context can, theoretically, look like anything: strings, numbers, path-like-stuff, whatever. The layers of conversion from the path in the URL to, ultimately, numbers or entity objects happens very, very late. In theory,

Re: No 404 error is raised

2010-10-15 Thread Moritz Gmelin
Hi, we've been running into this also. Fixed this by creating a custom 404 page and setting this as the default start page. FourOhFour.tml http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Page not found And FourOhFour.java import org.apache.tapestry5.Link; import org.apa

Re: No 404 error is raised

2010-10-15 Thread stephanos
> As the JIRA ticket says, this is expected behavior. In your case, /blabla > is considered a request to / (Index) with one activation context parameter > 'blabla' as there's no page named 'blabla'. I was just wondering why the ticket is still 'Open' and has a patch that apparently was never

Re: No 404 error is raised

2010-10-15 Thread Kalle Korhonen
Hmm... that's true, the Start page is "broken" as well in 5.2 - you can't get it to return 404s anymore using Start page the same way as in 5.1. That's a showstopper for upgrading one of my apps to 5.2. I bet there's a way to restore the old behavior, anyone solved this already? Kalle On Fri, Oc

Re: No 404 error is raised

2010-10-15 Thread Massimo Lusetti
On Thu, Oct 14, 2010 at 11:16 PM, Thiago H. de Paula Figueiredo wrote: > As the JIRA ticket says, this is expected behavior. In your case, /blabla is > considered a request to / (Index) with one activation context parameter > 'blabla' as there's no page named 'blabla'. Correct and acknowledged b

Re: No 404 error is raised

2010-10-14 Thread Thiago H. de Paula Figueiredo
On Thu, 14 Oct 2010 17:17:49 -0300, stephanos wrote: Hi guys, Hi! I'm making my first steps with Tapestry 5.2 and find one thing very peculiar: All requests seem to go to the Index page (Index.tml in 'root') by default - even if the path does not exist! Example with page Index.tml and