Chuck, 
I ended up taking care of it within the servlet/jsp. Not a new page, and maybe 
not the most elegant thing in the world, but it does the job.

---
catch(Exception SQex){
    SQex.printStackTrace();
        log("SQL exception:", SQex);
        if (SQex!=null) {
        out.println("<p><br><span class='reddate'>Your ID may not work properly 
now.</span><br>");
    out.println("<span class='reddate'>Either your userID was deactivated or 
you're not allowed to vote in this branch.</span><br>");
out.println("<a href='mailto:[EMAIL PROTECTED] Control password reactivation 
needed&Body=Your manager will need to approve reactivation of your password' 
class='bodtxtBoldsmx'>Click here</a> <span class='bodtxtBoldsmx'>to contact 
Default Change Control to have your password reactivated<br> It could be that 
you're not delegated for this particular branch.</span>");
        }
    if (SQex.getMessage().equalsIgnoreCase("Exhausted Resultset")) {
        connection.close(); 
        }
 }
------------


-----Original Message-----
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 2:58 PM
To: Tomcat Users List
Subject: RE: customized error page for tomcat depending on code


> From: Propes, Barry L [mailto:[EMAIL PROTECTED] 
> Subject: RE: customized error page for tomcat depending on code
> 
> I believe the webapp catches it prior to that, Chuck.

If the webapp catches the exception, then how could you expect Tomcat to
process it?

> And FYI, I tried it with a space and without. You would think 
> that I'd get a malformed XML error upon startup, wouldn't you?

No, I wouldn't.  Pretty much any string of Unicode characters is
syntactically valid for most XML attributes; it's the semantics of the
value that are important, and clearly, no class name should have a space
in it (although, technically, spaces are allowed).

Note that the value for an <exception-type> must be a class name,
nothing more.  There's no mechanism defined in the servlet spec to
utilized attributes of an exception, which is what you're trying to do.
If you have control of the webapp, you could have it catch that
particular exception and then rethrow some unique type that could be
declared in <exception-type>.

 - Chuck

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to