https://issues.apache.org/bugzilla/show_bug.cgi?id=56658

Konstantin Kolinko <knst.koli...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Catalina                    |Catalina
            Version|6.0.41                      |8.0.9
            Product|Tomcat 6                    |Tomcat 8
   Target Milestone|default                     |----

--- Comment #3 from Konstantin Kolinko <knst.koli...@gmail.com> ---
The fix for this issue caused a regression for web application reload.
(It was reported on the [VOTE] thread for 8.0.10 release candidate).

Steps to reproduce:
1. Start Tomcat
2. Open http://localhost:8080/examples/index.html
The page loads, as expected.

3. Touch $CATALINA_BASE/webapps/examples/WEB-INF/web.xml. This causes reload of
the examples webapp.
4. Wait until reload of examples webapp completes successfully.

5. Refresh (Ctrl+F5) http://localhost:8080/examples/index.html
Expected: the page
Actual: error 404

>From debugging:
---------------
After reload the lists of wrappers in MApper$ContextVersion object for this web
application are empty. In other words, none of the servlets of this webapp are
registered with the the mapper.

The cause:
-----------
Old code did 
[[[
        mapper.addContextVersion(...);
        for (Container container : context.findChildren()) {
            registerWrapper((Wrapper) container);
        }
]]]

The first call "addContextVersion(...)" after reload tried to re-register the
same context with the mapper. As the context has already been registered, the
call actually failed, but subsequent "registerWrapper()" calls did work
successfully.

The new code essentially skips registration of wrappers if "addContextVersion"
fails.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to