tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin HaleBoyes <>
Subject behaviour of getRequestDispatcher for bogus URLs
Date Tue, 21 Aug 2001 16:31:34 GMT
What should the behaviour be if I call forward() on
a RequestDispatcher that (I know) doesn't exist?
  (Ya, ya, I get the same behaviour as if I didn't know
   it doesn't exist :-)

For example:

         forward(request, response);

I would expect a NullPointerException but that is not what I get.
Instead, I see the following output in my browser window (Mozilla 0.92):
Or "The document contains no data" from Netscape 4.7.
And, if I use lwp-request I get a 404 error which is reasonable.

What "should" I get?

The javadoc for ServletContext says:
   "This method returns null if the ServletContext cannot
    return a RequestDispatcher for any reason."
But I'm not sure what that reason might be given that a bogus URL
doesn't seem to do it.  Also, the spec doesn't say anything about
bad URLs.


Do You Yahoo!?
Get your free address at
or your free address at

View raw message