On Tue, Oct 27, 2009 at 1:36 AM, ant elder <[email protected]> wrote: >> Could you please explain why we need this ? This breaks webApp in >> general for me again, and services URI now have the webapp context >> twice (e.g >> /store-catalog-ibmcloud-2x-webapp/store-catalog-ibmcloud-2x-webapp/Catalog) >> >> > > If a servlet is registered before WebAppServletHost init has been > called then the servlet would be registered using the default context > path value (which is "/"), when init does run and updates to the > correct contextPath value (eg /store-catalog-ibmcloud-2x-webapp) then > the servlet needs to be reregistered on the correct value otherwise > its lookups will fail. > > Are you sure its caused by this bit of code and not the change to the > fiddlePath method in r829732 which is also in the area? >
Removing changes from r829733 makes things working for me again. > If you've traced through the code to see this is where its going wrong > then can you see how the first "store-catalog-ibmcloud-2x-webapp" is > getting in there? That seems odd, is it possible that > WebAppServletHost.init is running twice? > > I've tried the webapp samples in Jetty, Tomcat, in the itest > integration, and running standalone, and they're all working properly > for me with this, and the Hudson build which is testing running all > the webapp samples is working too. How can I recreate what you're > doing to debug where its going wrong? There's a log message outputs > the contextPath just before that code runs, what does it show the > contextPath is? > I don't see any errors running the build, but any war that I build and then deploy in tomcat fails (e.g the service endpoint is unavailable). You probably won't see the issue in standalone applications as they don't use the context root. I can try to give you more details little later today, as I'd need to revert some local changes to be able to reproduce the problem again and I'm trying to solve a new classLoading issue so my app can work again. -- Luciano Resende http://people.apache.org/~lresende http://lresende.blogspot.com/
