On Fri, Jan 27, 2012 at 1:45 PM, Pid <p...@pidster.com> wrote:
> On 27/01/2012 18:38, Jonathan Rosenberg wrote:
>> That is in the original CAS server web.xml.  I left it untouched.
>
> For the rest of the day, as an experiment I will bottom-post to any
> thread containing a reply via top-post.
>
>
>> On Fri, Jan 27, 2012 at 1:35 PM, Pid <p...@pidster.com> wrote:
>>> On 27/01/2012 18:00, Jonathan Rosenberg wrote:
>>>> Vital stats:
>>>>
>>>> Apache Tomcat/7.0.22  1.6.0_20-b20    Sun Microsystems Inc.   Linux
>>>>       2.6.34.7-56.40.amzn1.i686
>>>>
>>>> I have a CAS server deployed on this instance.
>>>>
>>>> I am trying to catch errors within the server (e.g., DB down) so I can
>>>> display friendly page to user & log error.
>>>>
>>>> In the web.xml for the CAS server I have (I added error-page for
>>>> java.lang.Exception, ohters were already there)
>>>>
>>>> <error-page>
>>>>               
>>>> <exception-type>org.springframework.context.ApplicationContextException</exception-type>
>>>>               <location>/WEB-INF/view/jsp/brokenContext.jsp</location>
>>>>       </error-page>
>>>>
>>>>       <error-page>
>>>>               <exception-type>java.lang.Exception</exception-type>
>>>>               <location>/WEB-INF/view/jsp/exception.jsp</location>
>>>>       </error-page>
>>>>
>>>>       <error-page>
>>>>         <error-code>500</error-code>
>>>>               <location>/WEB-INF/view/jsp/errors.jsp</location>
>>>>       </error-page>
>>>>
>>>>       <error-page>
>>>>               <error-code>404</error-code>
>>>>               <location>/</location>
>>>>       </error-page>
>>>
>>> Is the above correct?  A 404 returns '/'?
>>>
>>>
>>> p
>>>
>>>>     <error-page>
>>>>         <error-code>403</error-code>
>>>>         <location>/403.html</location>
>>>>     </error-page>
>>>>
>>>> Bu when I trigger an error (i.e., stop DB) I am seeing the default
>>>> Tomcat error page:
>>>>
>>>> HTTP Status 500 -
>>>> type Exception report
>>>> message
>>>> description The server encountered an internal error () that prevented
>>>> it from fulfilling this request.
>>>> exception
>>>> org.springframework.webflow.execution.ActionExecutionException:
>>>> Exception thrown executing [AnnotatedAction@17b2b99 targetAction =
>>>> [EvaluateAction@16b653d expression =
>>>> authenticationViaFormAction.submit(flowRequestContext,
>>>> flowScope.credentials, messageContext), resultExpression = [null]],
>>>> attributes = map[[empty]]] in state 'realSubmit' of flow 'login' --
>>>> action execution attributes were 'map[[empty]]'
>>>> . . .
>>>>
>>>> I'm a newbie to Tomcat & am not sure where to start looking.
>>>>
>>>> --
>>>> Jonathan Rosenberg
>>>> Founder & Executive Director
>>>> Tabby's Place, a Cat Sanctuary
>>>> http://www.tabbysplace.org/
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>>
>>>
>>>
>>> --
>>>
>>> [key:62590808]
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>
> Did you post the whole error page definition block?
> What was the original contents and what have you added?

Original error-page elements:

        <error-page>
                
<exception-type>org.springframework.context.ApplicationContextException</exception-type>
                <location>/WEB-INF/view/jsp/brokenContext.jsp</location>
        </error-page>

        <error-page>
                <exception-type>java.lang.Exception</exception-type>
                <location>/WEB-INF/view/jsp/exception.jsp</location>
        </error-page>

        <error-page>
        <error-code>500</error-code>
                <location>/WEB-INF/view/jsp/errors.jsp</location>
        </error-page>

        <error-page>
                <error-code>404</error-code>
                <location>/</location>
        </error-page>

    <error-page>
        <error-code>403</error-code>
        <location>/403.html</location>
    </error-page>

I added this

        <error-page>
                <exception-type>java.lang.Exception</exception-type>
                <location>/WEB-INF/view/jsp/exception.jsp</location>
        </error-page>
--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to