Hi Angelo,
You already have the request and response object what else would you
need? the Dispatcher example is great, but a changed a few lines, for
errors I use: response.sendError(401, "Authentication failed") instead
of the exception which I feel is not appropriate,for a redirect you
could use:
response.sendRedirect(arg0), a redirect should not be used for an error
though!... nevertheless the browser headers have everything you need...
look into the Location and Referer headers, I seem to recall the
Location header is used to retrieve the page you are targeting.
Peter
Angelo Chen wrote:
Hi,
I'm reading
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2
Tapestry5HowToCreateADispatcher2 , it works, but how to redirect a page in
the dispatch? here is the code:
if(!canAccess) {
throw new RuntimeException("Access violation!");
}
also, how to determine which page is being requested?
Thanks,
A.C.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]