Hi !
I'm using Tomcat 3.2.1
and Struts 1.0-b1.
I'm trying to set up an error page to catch all the 500 errors.
So, following web.dtd (and the order between tags), inside of web.xml, I added
those 4 lines :
<error-page>
<error-code>500</error-code>
<location>/common/error/noflash/index.html</location>
</error-page>
but it just do not work.
Tomcat prints the exception page.
If I set up a 404 error code, there is a StackOverFlow error (500)
when trying to reach a non-existant page.
I'm talking only on tomcat server. I'm accessing it trough the 8080 port.
(but through apache (80) it doesn't work too)
Do you have any ideas ?
Thanks
xavier
Here is included the complete version of my web.xml.
(which goes into the WEB-INF of my webapp)
----------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!-- Now, no need -->
<init-param>
<param-name>application</param-name>
<param-value>MessageResource</param-value>
</init-param>
<!-- -->
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- ViewArticle servlet -->
<servlet>
<servlet-name>viewArticle</servlet-name>
<servlet-class>article.ViewArticle</servlet-class>
</servlet>
<!-- ViewArticle servlet mapping -->
<servlet-mapping>
<servlet-name>viewArticle</servlet-name>
<url-pattern>/articlesubmission/viewArticle</url-pattern>
</servlet-mapping>
<!-- ViewSubmittedArticle servlet -->
<servlet>
<servlet-name>viewSubmittedArticle</servlet-name>
<servlet-class>articlesubmission.ViewArticle</servlet-class>
</servlet>
<!-- ViewSubmittedArticle servlet mapping -->
<servlet-mapping>
<servlet-name>viewSubmittedArticle</servlet-name>
<url-pattern>/article/viewSubmittedArticle</url-pattern>
</servlet-mapping>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>500</error-code>
<location>/common/error/noflash/index.html</location>
</error-page>
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
</web-app>