Bug 113392

Summary: Internal forwards ultimately mapping welcome files are broken on Tomcat
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel Berrangé <berrange>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: high Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-28 21:44:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 106481    
Attachments:
Description Flags
Fix for welcome file resolution
none
Logs illustrated the 2 requests. none

Description Daniel Berrangé 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

  /templates/ccm-ldn-portal/index.jsp

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
2.
3.
  
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 Berrangé 2004-01-13 15:03:46 UTC
Created attachment 96943 [details]
Fix for welcome file resolution

Comment 2 Daniel Berrangé 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
/templates/ccm-ldn-portal/index.jsp

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