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

--- Comment #5 from Jordi Llach <jlla...@gmail.com> ---
Thanks for the feedback, I can perfectly understand the rationale of your
comment

As said the problem is in JspServletWrapper's loadTagFile method, it should
check whether it has to reload or not by only checking the reload attribute,
and not by using getReloadInternal() method. Otherwise during application
startup JspRuntimeContext's checkCompile method can prevent some tag files to
be loaded, because it changes the value of the flag compileCheckInProgress, as
we saw in the stacktrace that comes from the TagFileProcessor.

I also noticed that JspServletWrapper's getDependants and loadTagFile methods
change reload attribute without proper synchronization, as JspServletWrapper's
getServlet and setServletClassLastModifiedTime do, so I "fixed" it, but that
was not the problem, maybe unnecessary ?

Maybe I am wrong but I also realized that JspServletWrapper's getServlet method
should execute always in case JspServletWrapper's attribute theServlet is null.
With the previous code JspRuntimeContext's checkCompile method could prevent a
first request to a jsp to initialize its JspServletWrapper's attribute
theServlet because it set compileCheckInProgress to true and thus
getReloadInternal method returns false

About TagFileProcessor change, I just fully initialized JspServletWrapper's
JspCompilationContext prior puting the former into the Map managed by
JspRuntimeContext. The rationale behind this change is that given that
JspRuntimeContext's checkCompile will iterate through this Map of jsp/tags I
just wanted to ensure that their content is fully initialized.

-- 
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