Now I remember one thing.. the order of tag is important.. ie <taglib>
cannot precede <error-page>  etc.. etc..

Here is a sample of mine, which I got it working.. note that I put <taglib>
last. Had I put it at the top, Tomcat will throw some exception..

Probably you can do some googleing on this...

---------------------------------

<?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>

  <error-page>
     <exception-type>java.lang.Throwable</exception-type>
     <location>/error/exception.jsp</location>
  </error-page>

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

  <error-page>
    <error-code>500</error-code>
    <location>/error/500.jsp</location>
  </error-page>

 <taglib>
  <taglib-uri>http://jakarta.apache.org/taglibs/session-1.0</taglib-uri>
   <taglib-location>/WEB-INF/session.tld</taglib-location>
 </taglib>

</web-app>

---------------------------------------





----- Original Message -----
From: "Armand Larregoity" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 6:44 PM
Subject: Re: Tomcat ignores the <error-page> configuration


> Rosdi,
>
> Thanks for the tip, but it doesn't work.
>
> Armand
>
> Rosdi bin Kasim a écrit :
>
> > I am guessing here, but try to remove the leading and trailing space.
See if
> > it work.
> >
> > Instead of:
> >
> > <location> /jsp/error.jsp </location>
> >
> > Why not:
> >
> > <location>/jsp/error.jsp</location>
> >
> > Rosdi bin Kasim.
> >
> > ----- Original Message -----
> > From: "Armand Larregoity" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 05, 2003 11:42 PM
> > Subject: Tomcat ignores the <error-page> configuration
> >
> > >
> > >     Hello,
> > >
> > >     I'm using Tomcat 4.1.12.
> > >     I'm trying to configure an error-page in the web.xml file  :
> > >
> > > <web-app>
> > >     ...
> > >   <error-page>
> > >      <exception-type>java.lang.Throwable</exception-type>
> > >      <location> /jsp/error.jsp </location>
> > >    </error-page>
> > >     ...
> > > </web-app>
> > >
> > >     but when an exception occurs, the request isn't forwarded to
> > > error.jsp. I simply get  a "org.apache.jasper.JasperException" in the
> > > catalina.out file.
> > >     When I put a         'errorPage="/jsp/error.jsp"' directive in my
> > > jsp pages, it works ...
> > >
> > >     Is the problem known ? Is there a problem in my web.xml file ?
> > >
> > > Armand
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to