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

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-01-28 21:44:40 UTC
Embargoed:


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

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.


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