The following issue has been updated:
Updater: Vincent Massol (mailto:[EMAIL PROTECTED])
Date: Sat, 17 Apr 2004 9:17 AM
Changes:
description changed from According to the J2EE v1.3 API documentation on
ServletContext, the
getRequestDispatcher(String path) method returns null if the ServletContext
cannot return a RequestDispatcher.
The AbstractServletContextWrapper.getRequestDispatcher() returns the
RequestDispatcherWrapper regardless of whether an actual RequestDispatcher
could be located. So, if the RequestDispatcher was not found the following will
cause a null pointer expception to be thrown at the forward():
// assume the URLpath to not exist within the current Servlet Context.
reqDispatcher = getServletContext().getRequestDispatcher(someURLPath);
if (reqDispatcher != null)
{
reqDispatcher.forward(request, response);
}
else
{
response.sendRedirect(someURLPath);
}
As a result, I have to disable the portion of my test that executes this code
with external URL's. to According to the J2EE v1.3 API documentation on
ServletContext, the
getRequestDispatcher(String path) method returns null if the ServletContext
cannot return a RequestDispatcher.
The AbstractServletContextWrapper.getRequestDispatcher() returns the
RequestDispatcherWrapper regardless of whether an actual RequestDispatcher
could be located. So, if the RequestDispatcher was not found the following will
cause a null pointer expception to be thrown at the forward():
// assume the URLpath to not exist within the current Servlet Context.
reqDispatcher = getServletContext().getRequestDispatcher(someURLPath);
if (reqDispatcher != null)
{
reqDispatcher.forward(request, response);
}
else
{
response.sendRedirect(someURLPath);
}
As a result, I have to disable the portion of my test that executes this code
with external URL's.
environment changed from Operating System: Windows NT/2K
Platform: PC to Operating System: Windows NT/2K
Platform: PC
priority changed to Major
Fix Version changed to 1.3
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/CACTUS-18?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/CACTUS-18
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CACTUS-18
Summary: AbstractServletContextWrapper.getRequestDispatcher() does not return NULL
Type: Bug
Status: Resolved
Priority: Major
Resolution: FIXED
Project: Cactus
Components:
Framework
Fix Fors:
1.3
Assignee: Vincent Massol
Reporter: Steven L. Youtsey
Created: Wed, 27 Mar 2002 11:48 PM
Updated: Sat, 17 Apr 2004 9:17 AM
Environment: Operating System: Windows NT/2K
Platform: PC
Description:
According to the J2EE v1.3 API documentation on ServletContext, the
getRequestDispatcher(String path) method returns null if the ServletContext
cannot return a RequestDispatcher.
The AbstractServletContextWrapper.getRequestDispatcher() returns the
RequestDispatcherWrapper regardless of whether an actual RequestDispatcher
could be located. So, if the RequestDispatcher was not found the following will
cause a null pointer expception to be thrown at the forward():
// assume the URLpath to not exist within the current Servlet Context.
reqDispatcher = getServletContext().getRequestDispatcher(someURLPath);
if (reqDispatcher != null)
{
reqDispatcher.forward(request, response);
}
else
{
response.sendRedirect(someURLPath);
}
As a result, I have to disable the portion of my test that executes this code
with external URL's.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]