Tapestry only calls the onActivate method that has a number of parameters
corresponding to the URL path segments after the last segment that is
recognized as a page name. Since there is no page named "indexxaasa" then
the last URL path segment that is recognized as a page name is "/". So
Tapestry considers "indexxaasa"  to be the activation context, and it then
calls the "/" page (implicitly the index.java page) and passes "indexxaasa"
as the activation context.


On Mon, Nov 12, 2012 at 7:06 AM, mateen <matee...@gmail.com> wrote:

> Hi,
>
> I came across some code that consists of a Index.java page and a index.tml
> page. In the index.java page we have
>
> Object onActivate(String... vals)
> {
>         return new HttpError(HttpServletResponse.SC_NOT_FOUND, "Page Not
> Found");
> }
>
> now this is real magic. If i sat mycontext/index thats fine, but if i say
> mycontext/indexxaasa this code executes. How is this possible? Why is the
> function only called when tapestry truncates the URL ?
>
> Kind Regards
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/using-onActivate-to-see-if-this-is-the-correct-page-tp5717931.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to