On Sat, Apr 29, 2017 at 12:01 PM Mark Thomas <ma...@apache.org> wrote:

> On 28/04/17 17:00, Matt Cosentino wrote:
> > Yes, it's other folders within WEB-INF. I turned on the TldScanner
> > logging and it is definitely what is causing the delay. My situation
> > probably isn't very typical. The delay varies in my various web
> > applications, the worst being about 20 seconds. It all adds up
> > though, and every second counts when our sites are down.
>
> There is a solution available but it is intended more for the embedded
> use case rather than a standard Tomcat install. Using it in a standard
> install would require (effectively) patching Tomcat.
>
> The general idea would be to use the TldPreScanned class. That does
> require all the TLDs to be listed in advance. On the plus side, no
> scanning delay. On the down side, adding TLDs requires code changes.
> Doing this with a standard Tomcat install requires changes to the
> JasperInitializer (hence the patch). I don't think there is a pure
> config way around that but I'll look into it.
>
> A better solution would probably be to make it easier to plugin in a
> custom TLDScanner - i.e. purely with config. If you'd like us to explore
> this option we should re-open 61052 and adjust accordingly. I don't
> think there is enough demand for filtering resource paths to make that
> worth implementing.
>
> One final thought. Are you running the web application from a WAR or an
> expanded directory? (The latter would be faster).
>
> Mark
>


Hello,

I reorganized the code of my web app and I moved all views (mainly .jsp
files) to WEB-INF/view folder.
This means that the WEB-INF/view folder is scanned recursively for TLD
files. And it takes some time...
I am very interested in using the TldPreScanned class, which I see has been
implemented.
How can it be used?

I think it would be very useful to have a feature in the Tomcat
configuration
to specify a custom class for scanning TLDs
or to skip specific folders from WEB-INF from scanning.

Best regards,

Jakub



>
> >
> > - Matt
> >
> >
> > -----Original Message----- From: Mark Thomas
> > [mailto:ma...@apache.org] Sent: Friday, April 28, 2017 7:28 AM To:
> > Tomcat Users List <users@tomcat.apache.org> Subject: Re: Skip
> > resource path in TLD scanner?
> >
> > On 27/04/17 23:39, Matt Cosentino wrote:
> >> https://tomcat.apache.org/tomcat-8.0-doc/config/systemprops.html
> >>
> >> There is one for skipping jar files:
> >>
> >> tomcat.util.scan.StandardJarScanFilter.jarsToSkip
> >
> > <snip/>
> >
> >> It skips /WEB-INF/classes/ and /WEB-INF/lib/, but it does not check
> >> any property to skip user defined paths.
> >
> > Is it other paths within WEB-INF you need to skip?
> >
> > When I read "skipping resource paths" I was thinking of skipping the
> > various places where Tomcat treat directories as JARs that then get
> > scanned for TLDs (which can be configured via the JarScanner). But it
> > sounds like skipping those won't help you.
> >
> > How sure are you that it is checking the directories below WEB-INF
> > that is the cause of the delay? That isn't a typical source of
> > start-up delay although it is certainly possible.
> >
> > Finally, what sort of delay are we talking out here? Seconds?
> > Minutes?
> >
> > Mark
> >
> >
> >> -----Original Message----- From: Mark Thomas
> >> [mailto:ma...@apache.org] Sent: Thursday, April 27, 2017 5:05 PM
> >> To: Tomcat Users List <users@tomcat.apache.org> Subject: Re: Skip
> >> resource path in TLD scanner?
> >>
> >> On 27/04/17 21:17, Matt Cosentino wrote:
> >>> I need to skip some of the resource paths within WEB-INF. I know
> >>>  there's a property for skipping jar files, but I couldn't find
> >>> one for resource paths. I reported this as a bug and was told
> >>> that the property exists. Where is it?
> >>
> >> Where have you looked?
> >>
> >> Mark
> >
> > ---------------------------------------------------------------------
> >
> >
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
> > ---------------------------------------------------------------------
> >
> >
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Jakub Królikowski
+49 162 6400341

Reply via email to