This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit e5c25b096f13728feb00a132b073659b1d17e7ca Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Apr 19 20:34:39 2021 +0100 Allow use of jsp-file without JSP based servlet being loaded at startup This is particularly useful in unit tests as west/webapp is laoded many times and loaded the jsp-file based servlets every time has a measurable performance impact (adds ~10% in my local tests) --- java/org/apache/catalina/core/StandardWrapper.java | 2 +- webapps/docs/changelog.xml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/StandardWrapper.java b/java/org/apache/catalina/core/StandardWrapper.java index d233568..aa04b8a 100644 --- a/java/org/apache/catalina/core/StandardWrapper.java +++ b/java/org/apache/catalina/core/StandardWrapper.java @@ -335,7 +335,7 @@ public class StandardWrapper extends ContainerBase @Override public int getLoadOnStartup() { - if (isJspServlet && loadOnStartup < 0) { + if (isJspServlet && loadOnStartup == -1) { /* * JspServlet must always be preloaded, because its instance is * used during registerJMX (when registering the JSP diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index fd6ebd7..d248431 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -126,6 +126,14 @@ Review code used to generate Java source from JSPs and tags and remove code found to be unnecessary. (markt) </scode> + <update> + <code><servlet></code> entries in web.xml that include a + <code><jsp-file></code> element and a negative + <code><load-no-startup></code> element that is not the default + value of <code>-1</code> will no longer be loaded at start-up. This + makes it possible to define a <code><jsp-file></code> that will + not be loaded at start-up. (markt) + </update> </changelog> </subsection> <subsection name="Web applications"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org