2 Replies Latest reply on Sep 27, 2001 8:52 PM by 3004

    error-page declaration in web.xml

    3004
      Hi,
                
                I've added this to web.xml
                
                <error-page>
                <exception-type>javax.servlet.ServletException</exception-type>
                <location>/pages/ErrorPage.jsp</location>
                </error-page>
                
                the server redirects to /pages/ErrorPage.jsp
                
                great! except for the fact that the implicit object "exception" is null in
                the error page - Not so great!
                
                anyone got error pages working in weblogic? Tomcat works fine.
                
                Cheers
                Nathan
                
                
                
                
                
                
                
                
        • 1. Re: error-page declaration in web.xml
          3004
          Sorry, I should've clarified. The error page does have the isErrorPage
                    directive set to true.
                    
                    weblogic doesn't seem to be passing the exceptions to the error page. The
                    only situation I can find where weblogic does pass exceptions to the error
                    page is if you specifiy the <error-page> in every jsp (servlets still don't
                    result in the exception being passed to the error page). The error page is
                    being display, the problem is that the exception is null
                    
                    -----Original Message-----
                    
                    From: shaik [mailto:shaikjava@hotmail.com]
                    
                    Sent: 25 May 2000 16:08
                    
                    To: bea
                    
                    Subject: Re: error-page declaration in web.xml
                    
                    
                    
                    You also need to set isErrorPage attribute of page directive in
                    
                    ErrorPage.jsp to true. Else, exception object is not available. (JSP1.1
                    
                    Specs page 46).
                    
                    <%@ page isErrorPage="true">
                    
                    Default is "false".
                    
                    "bea" <nathan.coast@levelseas.com> wrote in message
                    news:3b4d8c8d$1@newsgroups.bea.com...
                    > Hi,
                    >
                    > I've added this to web.xml
                    >
                    > <error-page>
                    > <exception-type>javax.servlet.ServletException</exception-type>
                    > <location>/pages/ErrorPage.jsp</location>
                    > </error-page>
                    >
                    > the server redirects to /pages/ErrorPage.jsp
                    >
                    > great! except for the fact that the implicit object "exception" is null
                    in
                    > the error page - Not so great!
                    >
                    > anyone got error pages working in weblogic? Tomcat works fine.
                    >
                    > Cheers
                    > Nathan
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    
                    
                    
          • 2. Re: error-page declaration in web.xml
            3004

                      I'm getting the exact same error.
                      jsp pages work fine, but for servlets the exception object,
                      although not null, does not have any info in it.
                      
                      
                      "bea" <nathan.coast@levelseas.com> wrote:
                      >Hi,
                      >
                      >I've added this to web.xml
                      >
                      > <error-page>
                      > <exception-type>javax.servlet.ServletException</exception-type>
                      > <location>/pages/ErrorPage.jsp</location>
                      > </error-page>
                      >
                      >the server redirects to /pages/ErrorPage.jsp
                      >
                      >great! except for the fact that the implicit object "exception" is null
                      >in
                      >the error page - Not so great!
                      >
                      >anyone got error pages working in weblogic? Tomcat works fine.
                      >
                      >Cheers
                      >Nathan
                      >
                      >
                      >
                      >
                      >
                      >
                      >