Bug 113392 - Internal forwards ultimately mapping welcome files are broken on Tomcat
Summary: Internal forwards ultimately mapping welcome files are broken on Tomcat
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
(Show other bugs)
Version: nightly
Hardware: All Linux
Target Milestone: ---
Assignee: ccm-bugs-list
QA Contact: Jon Orris
Depends On:
Blocks: 106481
TreeView+ depends on / blocked
Reported: 2004-01-13 15:02 UTC by Daniel Berrange
Modified: 2007-04-18 17:01 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-28 21:44:40 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix for welcome file resolution (2.31 KB, patch)
2004-01-13 15:03 UTC, Daniel Berrange
no flags Details | Diff
Logs illustrated the 2 requests. (11.96 KB, text/plain)
2004-01-13 15:05 UTC, Daniel Berrange
no flags Details

Description Daniel Berrange 2004-01-13 15:02:38 UTC
Description of problem:
The c.a.web.ApplicationFileServlet is used to resolve requests to URLs
such as /ccm/portal/ into files in the webapp, such as
/templates/ccm-ldn-portal/. After resolving a file it invokes the
'forward' method on RequestDispatcher to do an internal redirect. When
the servlet container gets this request, it will (in this example)
need to do welcome file resolutionm, to /templates/ccm-ldn-portal/
turns into /templates/ccm-ldn-portal/index.jsp. It should then forward
to this concrete file for ultimate execution. 

Resin does this correctly. Unfortunately in their infinite wisdom, the
Tomcat developers changed this process early in the 4.0.x dev cycle so
it instead does a 302 redirect after resolving the welcome file. Thus
the brower ends up requesting


which fails since it has bypassed the CCM dispatcher, thus none of our
context stuff in WebContext and KernelContext is initialized.
Ultimately we get a exception when the JSP in question tries to access
some of this context. This breaks a large part of APLAWS, since we use
internal forwards to JSPs all over the place.

The only (simple) way around this bug in Tomcat that I can see, is to
make ApplicationFileServlet do welcome file resolution.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Request /ccm/portal/ on an APLAWS server
Actual results:
Browser is redirected to /templats/ccm-ldn-portal/index.jsp and an
exception is thrown

Expected results:
The portal index page is rendered

Additional info:
I will attach the patch.

Comment 1 Daniel Berrange 2004-01-13 15:03:46 UTC
Created attachment 96943 [details]
Fix for welcome file resolution

Comment 2 Daniel Berrange 2004-01-13 15:05:23 UTC
Created attachment 96944 [details]
Logs illustrated the 2 requests.

Logs illustrating the problem. The first request for /ccm/portal is 302'd to

Comment 3 Richard Li 2004-01-14 17:45:47 UTC
justin has reviewed; merged @39352.

Note You need to log in before you can comment on or make changes to this bug.