Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] classpath scanning

Geert,

The default behaviour (spec compliance) is to scan all jars in
WEB-INF, so an empty pattern scans all jars. Here's the comment from
the code:

WebInfConfiguration line 118:  //null is inclusive, no pattern == all
jars match

Jan

On 29 March 2012 02:56, Gert-Jan van de Streek <g.j.streek@xxxxxxxx> wrote:
>
> This configuration does not seem to have any effect, while from what I understand it should effectively turn classpath scanning off:
>
> <Configure class="org.eclipse.jetty.webapp.WebAppContext">
>    <Set name="contextPath">/langur</Set>
>    <Set name="war"><SystemProperty name="jetty.home"/>/langur</Set>
>    <Set name="defaultsDescriptor">etc/webdefault.xml</Set>
>    <Call name="setAttribute">
>                <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
>                <Arg></Arg>
>        </Call>
> </Configure>
>
>
> On Mar 28, 2012, at 12:27 AM, Jan Bartel wrote:
>
>> You can set the context attribute
>> "org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern" with a set
>> of patterns matching jar names that you want to include in the
>> scanning.
>>
>> Here's an example of a pattern that is used to control which jars on
>> the container classpath are scanned:
>>
>> .*/.*jsp-api-[^/]*\.jar$|.*/.*jsp-[^/]*\.jar$|.*/.*taglibs[^/]*\.jar$
>>
>>
>> regards
>> Jan
>>
>>
>> On 26 March 2012 23:03, Gert-Jan van de Streek <g.j.streek@xxxxxxxx> wrote:
>>>
>>> Classpath scanning for servlets etc is currently taking up about 20 of the starting time of our webapp. This is probably due the number of included jars (about a hundred).
>>>
>>> Is there any way to hint the scanner which jar files to include in (or what jar files to exlude from) classpath scanning?
>>>
>>> Met vriendelijke groet, regards,
>>>
>>> Gert-Jan van de Streek
>>>
>>> _______________________________________________
>>> jetty-users mailing list
>>> jetty-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top