Link to home
Start Free TrialLog in
Avatar of dhunter_12
dhunter_12Flag for Mexico

asked on

Explorer shows custom error when using <error-page> for error 500 in tomcat

Hello!
I setup my tomcat to handle exceptions and errors, and to redirect to custom pages.
However, explorer shows a default error when presented with a 500 error. I know I can disable this on the explorer, but I'm looking for a way to do this on the server side.

And if there's a way to make spring handle  it, better yet

   
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
	version="2.4">
 
	<display-name>sample-01</display-name>
 
	
 
	<filter-mapping>
		<filter-name>encodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
 
	
	<!-- Http Flex Session attribute and binding listener support -->
	<listener>
		<listener-class>flex.messaging.HttpFlexSession</listener-class>
	</listener>
 
	
	
	<!-- spring security filter-->
	<filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
	<filter-mapping>
      <filter-name>springSecurityFilterChain</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>
 
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContext*.xml</param-value>
	</context-param>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
 
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
	</welcome-file-list>
	
	<error-page>
	    <exception-type>org.springframework.security.ui.preauth.PreAuthenticatedCredentialsNotFoundException</exception-type>
	    <location>/authenticationException.jsp</location>
	  </error-page>
	
	 <error-page>
        <error-code>500</error-code>
        <location>/error.jsp</location>
    </error-page>
    
    <error-page>
        <error-code>403</error-code>
        <location>/error403.jsp</location>
    </error-page>
    
    
</web-app>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of dhunter_12
dhunter_12
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial