You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/04/13 19:07:37 UTC

[Bug 57809] New: Don't store merged web.xml

https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

            Bug ID: 57809
           Summary: Don't store merged web.xml
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: kustos@gmx.net

Created attachment 32647
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32647&action=edit
simple patch

I analyzed several heap dumps to find out why for small applications Tomcat
uses more memory than Jetty. Some of this seems to come from the fact that for
ever web application a merged web.xml is stored in memory. A comment in
ContextConfig suggests that this was once necessary for Jasper but it looks as
if the relevant TODO has been fixed by now.

On a default Tomcat with the default applications this saves about 1MB.

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

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


[Bug 57809] Don't store merged web.xml

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

Philippe Marschall <ku...@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32647|0                           |1
        is obsolete|                            |

--- Comment #6 from Philippe Marschall <ku...@gmx.net> ---
Created attachment 32661
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32661&action=edit
2nd try at a patch

Updated patch:
- keeps the constant but marks it as deprecated
- keeps the switch to log the merged web.xml for debugging

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

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


[Bug 57809] Don't store merged web.xml

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Mark Thomas <ma...@apache.org> ---
Thanks for the patch. I'd forgotten about this issue until after I had already
fixed the code buy my approach was broadly similar.

The constant for the attribute name has been deprecated in 8.0.x and the
constant and the use of it has been removed in 9.0.x.

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

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


[Bug 57809] Don't store merged web.xml

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> ---
In Tomcat 7 the MERGED_WEB_XML ("org.apache.tomcat.util.scan.MergedWebXml")
attribute is used to pass web application configuration to Jasper.

In Tomcat 8 it is unused, but it is used by Tomcat test cases (TestWebXml).
Your "simple patch" will break the tests.

In theory, there can be 3rd party code that uses this feature.


http://markmail.org/message/hqnuyvikofmfcbl2
"Offline generation of effective web.xml" thread on 2012-09,
one of first discussions of this issue.

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

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


[Bug 57809] Don't store merged web.xml

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Remy Maucherat <re...@apache.org> ---
The constant doesn't look like it is used, but this may not be such a good
idea. I'll leave the BZ open for further review.

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

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


[Bug 57809] Don't store merged web.xml

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

--- Comment #4 from Remy Maucherat <re...@apache.org> ---
I think this can be useful for debugging and monitoring (management interfaces
like this kind of stuff), but since this is a String it is probably not that
useful for apps.

testWebXml mentions it but doesn't actually test it.

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

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


[Bug 57809] Don't store merged web.xml

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

--- Comment #5 from Philippe Marschall <ku...@gmx.net> ---
The flag to log the merged web.xml is still in there.

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

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


[Bug 57809] Don't store merged web.xml

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57809

--- Comment #3 from Philippe Marschall <ku...@gmx.net> ---
Which part of TestWebXml does it break? The test compiles and 19/19 tests are
green.

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

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