Bug 113392 - Internal forwards ultimately mapping welcome files are broken on Tomcat
Internal forwards ultimately mapping welcome files are broken on Tomcat
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
Depends On:
Blocks: 106481
  Show dependency treegraph
Reported: 2004-01-13 10:02 EST by Daniel Berrange
Modified: 2007-04-18 13:01 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-28 16:44:40 EST
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 10:03 EST, Daniel Berrange
no flags Details | Diff
Logs illustrated the 2 requests. (11.96 KB, text/plain)
2004-01-13 10:05 EST, Daniel Berrange
no flags Details

  None (edit)
Description Daniel Berrange 2004-01-13 10:02:38 EST
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 10:03:46 EST
Created attachment 96943 [details]
Fix for welcome file resolution
Comment 2 Daniel Berrange 2004-01-13 10:05:23 EST
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 12:45:47 EST
justin has reviewed; merged @39352.

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