Surely you mean:

String more = "cowbell";
more = null;
more.toString();

or even:

String more = null;
more.toString();

Andoni.

----- Original Message -----
From: "Tim Funk" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 4:48 PM
Subject: Re: 500 Custom Error


> 500 errors can be webapp generated errors. You should get a 500 error if
you
> do the following in a servlet:
> String more = "cowbell;
> more = null;
> more.toString();
>
> Tomcat (or any container) will trap the null pointer exception and wrap it
> into a ServletException. The nullpointer exception is exposed during error
> processing as defined in "Table SRV.9-1 Request Attributes and their
types"
> in section 9.9.1 of the spec.
>
> -Tim
>
> Shapira, Yoav wrote:
> > Howdy,
> >
> >
> >>Are Custom Error pages available for 500 errors?
> >
> >
> > 500's are tough, as they are internal server (i.e. not your webapp's)
> > errors.  I don't recall the spec on this point, but at some point I
> > thought error page customization only had to be available for 300 and
> > 400 range HTTP status.
> >
> > As 500's can occur anywhere in the request processing pipeline, it's
> > difficult to provide the custom error page hook for them.
> >
> >
> >>This is under tomcat 4.0.4. (Although production will be under
> >>4.1.24)
> >
> >
> > Not a good idea: there are significant differences between the 4.0.x and
> > 4.1.x branch of tomcat, and you should at least test, if not develop, on
> > 4.1.24 before deploying to it.
> >
> > Yoav Shapira
> >
>
>
> ---------------------------------------------------------------------
> 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