On Wed, 28 Mar 2001 [EMAIL PROTECTED] wrote:
>
>
>
> Hi. Just one more question on this...
>
> If I find an error when I do the initial check in the controller (see history),
> can I forward to an error page directly from the init() method? Is there a way
> to do this elegantly?
>
The init() method is not called for a particular request (in fact, it is
called *before* any request is allowed to be processed), so there is not
really any option to forward control to an error page. Instead, you
should throw a ServletException from the init() method. If the problem
you ran into is temporary, you can also throw an UnavailableException
instead, which gives you the option of saying how long the servlet
container should wait before trying again.
> Thanks,
>
> Dave
>
>
Craig