You'll probably want to explore changing your web.xml to forward users to
a standard error page, rather than showing them a stack trace.  This is
pretty common.  Take a look at the <error-page> element of the web.xml,
which will let you forward to specific pages for specific exceptions.

Glad to see folks are catching on to the new name.  :)

- Morgan


On Wed, 9 May 2001, Thomas [iso-8859-1] F�rster wrote:

> 
> Hi!
> 
> I'm using DBTags for accessing an SQL database, so far
> everything works quite well. But I didn't figure out yet,
> how to do the error-handling.
> Let's say the user tries  to connect to a db using the
> connection-tag. UserId and password are retrieved from an HTML-form.
> If the user entered an invalid password, the JSP generates an
> error:
> 
> javax.servlet.ServletException: java.sql.SQLException: Invalid authorization
> specification:
>  Access denied for user: 'nobody@localhost' (Using password: YES)
> 
> I want to catch this exception and forward to user to an error-page instead of
> showing
> this exception. How do I do this?
> 
> TIA
> 
> Thomas
> 

Reply via email to