Thanks! 

 

I can still not get it to work though.. I implement a runtimeerror that
occurs when the database cannot be contacted. I tried catching it in the
casLoginForm.jsp but that didn't work. 

So I tried to define new <error-pages> in the web.xml file but cannot
seem to get it to work.

I removed the 

<error-page>

                <exception-type>java.lang.Exception</exception-type>

                <location>/WEB-INF/view/jsp/errors.jsp</location>

        </error-page>

 

And replaced it with a 

<error-page>

 
<exception-type>java.lang.Exception.RuntimeException</exception-type>

                <location>/WEB-INF/view/jsp/dberrors.jsp</location>

        </error-page>

 

But I only get a message that there has been a runtimeexception that
obviously has not been handled. Is there anything else I have to edit so
the <error-page> tags in web.xml works?

 

Thank you so much,

 

Christian Haugen

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Scott Battaglia
Sent: 5. juli 2007 21:06
To: Yale CAS mailing list
Subject: Re: Question regarding on how to show other errors than
falseusername/password

 

If you're throwing a CAS authentication expection (and you extend the
AuthenticationException class) any value in the "code" field is mapped
back to a message in the message.properties that will be displayed on
the login page. 

Otherwise, if you throw a RuntimeException (or something that extends a
RuntimeException) it should be propagated up and you can either use
J2EE's exception handling mechanisms or Springs.

-Scott

On 7/5/07, Christian Haugen <[EMAIL PROTECTED]> wrote:

Hi!

 

Let's say that my database is down, how do I get that message across to
the user? When the pasword and username is validatet it replies with a
boolean answer. I want to do something similar for when I get a reply
from the db signifying that something is not right.

Lets say I return an DBok or a DBnok depending on whether the database
is up and running or not, where would I link this to an dberror.jsp in
the view folder?

 

Thank you so much in advance..

 

Christian


_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas




-- 
-Scott Battaglia

LinkedIn: http://www.linkedin.com/in/scottbattaglia 

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to