I'd like to use an Index page at the root of my Tapestry application (mostly
to get the / URL in links rather than /start), but I'd like to respond to
some of those page requests with a 404.
I've done this using the pattern described on the last a few times by adding
an onActivate(EventContext), which I look at to decide if I want to return
an instance of a PageNotFound page.  This results in a redirect, which I
believe is because this is an event handling-method.  I like the
redirect-after-post pattern, and most of the time, I'd probably like to keep
that as a default.  For this particular page, I don't want to use a redirect
-- in part because I want the original request to 404, in keeping with the
resource-oriented view of HTML.  Also, if I make a request for /myNewPage
before it's there, and I then implement it and refresh, I want the resulting
request to be for /myNewPage not /pagenotfound, which it'll be after the
redirect.

So is it possible to avoid the redirect here without disabling
redirect-after-post for the rest of Tapestry.

To be honest, if I could use a start page and get a "/" link instead of
"/start" that would also solve my problem for the time being -- although I
like the ability to provide a custom 404 tapestry page that this will give
me.

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/

Reply via email to