Hi,
>I use the new feature ServletContextListener of the Servlet
specifications
>2.3.
Great! So do I. ;)
>I don't what to do when the exception ExBadManagerName occurs. I am
trying
Log it, for one. Even if you don't have a logging system initialized,
you can use getServletContext().log("message", exception). Email the
admins, for two.
>to define in the web.xml file of my application the following element
><error-page>
> <exception-type>com.mycompagny.ExBadManagerName
</exception-type>
> <location>/pages/errorPage.jsp</location>
></error-page>
>but the page is not displayed.
>What can I do to inform the client if an exception occurs, the
index.jsp
>page of my application has not to be displayed.
When you're in the contextInitialized(sce) method, you don't have a
"client" yet. You're not tied into the connector, and so the error-page
tags don't mean a thing.
The idea is that the stuff done in contextInitialized(), and for that
matter, contextDestroyed(), is administrative / configuration
functionality that should not involve your users directly. That code
should be very carefully written and tested, and should be among the
most reliable code in your system. And your server startup and shutdown
should be tightly regulated and monitored. You don't want your users
(think malicious...) to know how / when / where you initialize and
shutdown things.
I hope that makes sense ;)
Yoav Shapira
Millennium ChemInformatics
This e-mail, including any attachments, is a confidential business communication, and
may contain information that is confidential, proprietary and/or privileged. This
e-mail is intended only for the individual(s) to whom it is addressed, and may not be
saved, copied, printed, disclosed or used by anyone else. If you are not the(an)
intended recipient, please immediately delete this e-mail from your computer system
and notify the sender. Thank you.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>