Hi,

There's no way to add new exception types to the doPost method. However,
you could do something like:

public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
{
        try
        {
                /*
                your code
                */
        }
        catch (SQLException exc)
        {
                throw new ServletException(exc);
        }
}

This way, the real exception goes nested within a ServletException and you
don't have to change the method signature.

Hope it helps,

   Ion



>But I want the exception to be caught in the error.jsp page, not do a try
>{...} catch{...} inside the doPost body.
>
>I don't know if I explained it correctly but is there a simple solution to
>this problem ?


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to