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.
Created attachment 96943 [details] Fix for welcome file resolution
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
justin has reviewed; merged @39352.