So ture, so true.  

Thank you!  :-)

Sincerely yours;

Mark Mynsted



VHA Management Information Systems Client Services
[EMAIL PROTECTED]
(972) 830 - 0592, Internal x1592

>>> [EMAIL PROTECTED] 5/4/2001 1:32:34 PM >>>
Using request the URL given can be relative and using the application it has
to be absolute begining with a '/'. Check to see if this may be the cause of
the error.

Thanks and Regards,

===
Gary Grewal


-----Original Message-----
From: Mark Mynsted [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 04, 2001 10:41 AM
To: [EMAIL PROTECTED] 
Subject: RequestDispatcher failure


Has anybody seen this behavior?

If I use the following code I get no errors.

RequestDispatcher dispatcher = request.getRequestDispatcher(url);
dispatcher.forward(request, response);


If I use the following code I get a null pointer exception because
dispatcher is null.

RequestDispatcher dispatcher = application.getRequestDispatcher(url);
dispatcher.forward(request, response);


This does not make sense to me.

request is the subclass of javax.servlet.ServletRequest for this
request.  application is the javax.servlet.ServletContext.  I know
that application is defined because I use it all the time for logging,
e.g. application.log("This is a log message");


Both the javax.servlet.ServletRequest and javax.servlet.ServletContext 
have a getRequestDispatcher(String) method.

Sincerely yours;

Mark Mynsted



VHA Management Information Systems Client Services
[EMAIL PROTECTED] 
(972) 830 - 0592, Internal x1592

Reply via email to